Closed llaville closed 3 years ago
As workaround we can use shivammathur/setup-php
GA as specified https://github.com/ramsey/composer-install#usage
For example in the same context project as previous : https://github.com/llaville/php-compatinfo-db/commit/8db3e4b5162496568a8aea72443afe3d9a6bb126
And all run fine, as expected ! See on full report https://github.com/llaville/php-compatinfo-db/runs/3729982777?check_suite_focus=true#step:6:3402 or just screenshot
Maybe you'd like to make a PR to update php install instructions so PHP8 is natively handled ? :)
Does it make sense for you to keep major PHP versions as different flavor ? Please vote !
That's mean a php7
and php8
instead of just a php
@nvuillam Finally, after study carefully source code of Mega-Linter, there is no need to have a different flavor for PHP 7 and PHP 8, as previously suggested.
Solution is to use ability to override executable and make it available at runtime with a new env var as follow PHP_BUILTIN_CLI_EXECUTABLE: "/usr/bin/php8"
, Default will be None and used linter name as executable.
And of course https://github.com/nvuillam/mega-linter/blob/v4.46.0/megalinter/descriptors/php.megalinter-descriptor.yml#L7-L19 will be updated to add php8 and modules both with existing php7 copies
If you are agree with it, a PR may follows
It's not just a POC, but a real possibility, I've tested. See following screenshot
Go ! :)
Describe the bug Side effects may be found when using Mega-Linter GA with other Github Actions that use PHP Platform
To Reproduce
nvuillam/mega-linter/flavors/php@v4
)Expected behavior Be able to configure Mega-Linter to accept PHP versions other than PHP 7.x or a better catching error about PHP platform
Screenshots
Additional context Mega-Linter v4.46 only support PHP 7 (confirmed by https://github.com/nvuillam/mega-linter/blob/v4.46.0/megalinter/descriptors/php.megalinter-descriptor.yml#L7-L19)