Skip to content
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

using different php versions #11

Open
staabm opened this issue Aug 21, 2019 · 2 comments
Open

using different php versions #11

staabm opened this issue Aug 21, 2019 · 2 comments

Comments

@staabm
Copy link
Contributor

staabm commented Aug 21, 2019

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.

@staabm
Copy link
Contributor Author

staabm commented Aug 21, 2019

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

@staabm
Copy link
Contributor Author

staabm commented Oct 6, 2019

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. staabm/thincache#16

That way I can even combine several tools in a single action and save some bootstrapping time, see the experiment at staabm/SysMonitor#18

@staabm staabm mentioned this issue Oct 6, 2019
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

No branches or pull requests

1 participant