Skip to content

Conversation

@Jeroeny
Copy link

@Jeroeny Jeroeny commented Sep 9, 2022

It'd be useful if the tmpDir is configurable using an environment variable. Right now it's only configurable in phpstan.neon > parameters > tmpDir. For example projects without tmpDir configured for the user, could still have/need a consistent tmpDir in CI. This way we can more easily persist the cache result for multiple projects, for subsequent CI runs.

Alternatively this could be implemented using a command option (analyse --tmpDir=..)

@staabm
Copy link
Contributor

staabm commented Sep 9, 2022

there is another proposal which might also fix your problem: #1469

the PR will use a better default logic so phpstan will in the end use a separate result-cache per phpstan-config.

could you check whether this would also work for you?

@Jeroeny
Copy link
Author

Jeroeny commented Sep 9, 2022

@staabm that seems to be a different usecase. I would actually want different cache directories depending on the context the analysis is running in.

@ondrejmirtes
Copy link
Member

Hi, environment- and machine-specific configuration options are already possible via: https://phpstan.org/config-reference#multiple-files

Alternative proposal and more general one is to allow any environment variable to be referenced in the configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants