GH Actions: fix test runs + start testing against PHP 8.2 #130
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GH Actions: fix test runs on PHP < 7.2
The
setup-php
action runner will automatically install the appropriate version of Composer depending on the PHP version requested - Composer 2.2 for PHP < 7.2 and Composer 2.3+ for PHP 7.2+.However, using
tools: none
disables this and falls back to the Composer version which is shipped with the Ubuntu image being used.Composer 2.3, which was released end of March, has a minimum PHP version of PHP 7.2, so will not work/be available to PHP < 7.2, so we need to ensure that the
setup-php
action runner installs the correct version, otherwise thecomposer install
needed for the tests will fail.Removing the
tools: none
should fix this.Note:
Autoload files generated with Composer 2.3 are no longer compatible with PHP < 5.6, though Composer 2.2 (with a minimum PHP version of PHP 5.3) is now a LTS (long term service) release and will receive essential bug fixes.
As the humbug/box config is explicitly set up to not include a Composer generated autoload file, this should not impact the PHAR file which is generated on releases of this project.
If this would ever change, the release workflow would need to be adjusted to include
tools: composer:2.2
for thesetup-php
action runner.Refs:
GH Actions: start running tests against PHP 8.2
PHP 8.2 - yet again - contains quite a number of deprecations which will become fatals in PHP 9.0.
As the impact is expected to be large, it is vital that packages used in the CI/test chain are ready in time to allow the applications/frameworks etc using these packages to get ready as well.
With that in mind, I'm proposing to start running the tests against PHP 8.2. At this time, the tests are passing, but keeping an eye on them over the next few months is strongly recommended.