Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow configuring tmpDir using PHPSTAN_TMPDIR environment variable #1717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Jeroeny wants to merge 1 commit into phpstan:1.8.x from Jeroeny:TmpDirEnv

Conversation

@Jeroeny
Copy link

@Jeroeny Jeroeny commented Sep 9, 2022
edited
Loading

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=..)

Copy link
Contributor

staabm commented Sep 9, 2022
edited
Loading

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?

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.

staabm reacted with thumbs up emoji

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /