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

Getting php 8.1 instead of 8.0 #73

Closed
aaldertdekker opened this issue Dec 27, 2021 · 5 comments · Fixed by #75
Closed

Getting php 8.1 instead of 8.0 #73

aaldertdekker opened this issue Dec 27, 2021 · 5 comments · Fixed by #75

Comments

@aaldertdekker
Copy link

aaldertdekker commented Dec 27, 2021

Trying to use php 8.0, but setting php_version to 8.0 results in 8.1

@euberdeveloper

This comment has been minimized.

@osma
Copy link
Contributor

osma commented Jan 21, 2022

@euberdeveloper This is not a duplicate of #67 - that problem was caused by a bad configuration (a separate run step).

I'm hitting the same problem in my project. If I specify PHP 7.x versions such as 7.2, 7.3 or 7.4, I get the version I asked for. But if I ask for 8.0, I get 8.1.1 instead.

I tried to debug this by forking php-actions/example-phpunit into osma/example-phpunit. The example in the original repo was a bit stale so I upgraded to php-actions/composer@v6 and php-actions/phpunit@v3. There are three branches which differ only in the PHP version requested using with::

Note that there is no separate run step in any of these, so it's not related to #67.

So a solution/workaround for now seems to be to use a more specific version such as 8.0.15 instead of just 8.0.

@ngrie
Copy link

ngrie commented Jan 21, 2022

@osma This is not a real bug but instead seems to be related to how numbers are interpreted in Yaml. 8.1 is used as is while 8.0 resolves to 8 so that the lastest 8.x version is used. You can fix this by wrapping the version number in quotes. We are using php_version: "8.0" for some actions without any issues.

@osma
Copy link
Contributor

osma commented Jan 21, 2022

Ah, right! Thanks a lot for the explanation @ngrie!

@osma
Copy link
Contributor

osma commented Jan 21, 2022

I verified this creating a branch test-php80-quotes with the version number specified as "8.0" and it gave me PHP 8.0.x (CI run).

The documentation doesn't use quotes for PHP version numbers - I will prepare a PR for the README.

@g105b g105b closed this as completed in #75 Jan 25, 2022
EmilePerron added a commit to eckinox/eckinox-cs that referenced this issue Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

4 participants