Tool information
php -vArea for Triage: PHP
Question, Bug, or Feature?: Feature
Virtual environments affected
Can this tool be installed during the build?
Yes
Tool installation time in runtime
2 to 3 min depending on OS
Are you willing to submit a PR?
Yes.
A good solution would be to install PHP 8.0 keeping 7.4 default on all 3 OS, which you can change say after a month to make PHP 8 default.
Hello @shivammathur ! Thank you for feature request.
Feel free to submit PR fo adding PHP 8.0 on Ubuntu.
As for the Windows and MacOS, thank you for raising concern. We will take a look deeper.
@maxim-lobanov I will create the PR for Ubuntu, should I switch to PHP 8.0 as default or keep 7.4 default for now.
Hi @shivammathur, thank you for the heads up, we have discussed possible risks internally and decided to go ahead with the latest PHP. This is how our macOS and Windows images always installed PHP (with Homebrew for macOS and Choco for Windows). If we would hardcode the previous version - we will receive requests to add the latest PHP, so the proper way would be to install 2 versions which will require significant refactoring of current logic.
The recommended way to use tools on images is through setup-* tasks, and setup-php in this case, so the workaround for any issues seems to be pretty easy.
Thanks.
@AlenaSviridenko Thanks for the clarification. Created PR #2162
@shivammathur , FYI: we found out that PHP 8.0 brings VS2019 build tools that caused issues on our Windows image previously. So we are hard-coding PHP 7.4 for some time https://github.com/actions/virtual-environments/pull/2170
@AlenaSviridenko Yes, Chocolatey has changed dependency from vcredist140 to visualstudio2019buildtools for PHP 8 unnecessarily.
@shivammathur just a quick update — macOS and Ubuntu images with PHP 8 were deployed, for windows, we're still waiting for the chocolatey package to be fixed
@miketimofeev Thanks, I have verified the same🙂