phpstan-ga
phpstan-ga copied to clipboard
using different php versions
I can see this action uses a php 7.3 docker container.
as the results of a phpstan scan depend on the used php version it would be great if this action would support/document how one can run the action using php 7.2/7.1/7.0 etc.
https://github.com/OskarStark/php-cs-fixer-ga has the same problem/need.
you would run the php-cs-fixer in the php version your production machine is running on, because the php language supports different language constructs/keywords. you will catch those errors (e.g. when using a php constrcut/keyword which is to new for your prod env) only if you run the php-cs-fixer in the correct php version/runtime
Hey Oskar.
First let me thank you for your hard work pushing github actions for some often used phptools at this early stage of GA. I was able to learn a lot and do some experiments based on your actions. Thank you soo much.
Finally I came to the conclusion that some tools require to much customizing to make use of your reposes/docker-containers as is.
- phpstan needs php extensions depending on the app beeing analyzed
- php-cs-fixer needs the same min php version as the project min php version
Instead I am using https://github.com/shivammathur/setup-php For now, which allows some deep customizing of the php environment in GA See e.g. https://github.com/staabm/thincache/pull/16
That way I can even combine several tools in a single action and save some bootstrapping time, see the experiment at https://github.com/staabm/SysMonitor/pull/18