Skip to content

Conversation

@dktapps
Copy link
Contributor

@dktapps dktapps commented Jan 2, 2026

Not sure how this should be tested on the CI, but I tested this locally and verified that it fixes phpstan/phpstan#13929.

If I understand the code in CommandHelper correctly, parameters.tmpDir will override this if set. This is a bit annoying, but since there's no way (that I know of) to tell if an ini setting was set on CLI override or by php.ini, I suppose this is the most predictable behaviour.

It doesn't look too difficult to add a command line option to override the tmpDir from what I can see, although I'm not too clear how that would interact with the dependency injection, so I'm reluctant to mess with it for now.

@dktapps
Copy link
Contributor Author

dktapps commented Jan 2, 2026

Semi related, some of these usages probably should be changed to respect the application config's tmpDir:

image

@ondrejmirtes
Copy link
Member

I'd merge this but please fix CS.

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.

php -dsys_temp_dir is not respected by subprocesses

2 participants