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

GH Actions: fix test runs + start testing against PHP 8.2 #130

Merged
merged 2 commits into from
Aug 4, 2022

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented May 4, 2022

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 the composer 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 the setup-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.

jrfnl added 2 commits May 4, 2022 05:18
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 the `composer 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 the `setup-php` action runner.

Refs:
* https://blog.packagist.com/composer-2-3/
* https://github.com/composer/composer/releases
* https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
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.
@jrfnl jrfnl added this to the 2.1 Next milestone May 4, 2022
@jrfnl jrfnl requested a review from antecedent May 4, 2022 03:24
@jrfnl
Copy link
Collaborator Author

jrfnl commented Jun 27, 2022

@antecedent As PHP 8.2-alpha2 has been released by now, could this PR please get some love ?

@antecedent antecedent merged commit 0aa3717 into master Aug 4, 2022
@antecedent
Copy link
Owner

I apologize for the awful delay here. Thank you very much for this contribution!

@jrfnl jrfnl deleted the feature/ghactions-fix-test-runs branch August 4, 2022 10:25
@jrfnl
Copy link
Collaborator Author

jrfnl commented Aug 4, 2022

@antecedent No worries, just glad it's in now.

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

Successfully merging this pull request may close these issues.

2 participants