-
-
Notifications
You must be signed in to change notification settings - Fork 863
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
Allow referencing env variables in project config #1918
Comments
Yes, and why is that not sufficient? :) |
Because the CI server requires a specific cache directory. |
You can make a local phpstan.neon file and put the versioned one into It's a pretty common practice that allows you to override project configuration with local machine's specific settings. |
@ondrejmirtes the path to the cache is acessed via an environment variable. |
We could change this feature request to "make environment variables accessible in the neon config". |
it's ok for me, but why passing it as an argument is a problem? |
I don't want to overload it with too many options, I allowed the paths and level to be in both CLI options and in the neon config with screeching teeth :) I don't want to do it for everything. |
I understand your point, but allowing it as an option would be much more flexible IMHO. |
I think that my suggestion will make everything much more flexible :) BTW right now you could generate .neon config based on your env variable and use that. I do a similar thing right here: https://github.com/phpstan/phpstan/blob/master/build.xml#L193-L223 |
@ondrejmirtes I figured I could do a PR for this because I might need it, but I do have a couple of questions:
|
@tbmatuka Adding it to LoaderFactory would help you to only reference it in |
This is now as simple as phpstan/phpstan-src#2559 but it's blocked by nette/di#291. Most of the work was unblocked by phpstan/phpstan-src#2558 |
Implemented: phpstan/phpstan-src#2559 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
For CI environment, it would be nice to have an option to specify the temporary directory when running PHPStan. Currently, it can only be configured through the configuration file.
The text was updated successfully, but these errors were encountered: