Drop PHP 7.4 support, require PHP 8.2+, upgrade PHPUnit to v11#3
Open
datengraben wants to merge 1 commit into
Open
Drop PHP 7.4 support, require PHP 8.2+, upgrade PHPUnit to v11#3datengraben wants to merge 1 commit into
datengraben wants to merge 1 commit into
Conversation
- composer.json: bump php constraint from >=7.3 to >=8.2 - composer.json: upgrade phpunit/phpunit from ^8.5 to ^11.0 - composer.json: remove phpunit/php-code-coverage (bundled in PHPUnit 11) - phpunit.xml.dist: update schema to PHPUnit 11, migrate <coverage><include> to <source>, replace removed logging types with junit, drop deprecated convertErrorsToExceptions / convertNoticesToExceptions attributes - phpunit.yml: replace 7.4/8.2 matrix with 8.2/8.3, drop PHP 7.4 special-case install step, use vendor/bin/phpunit instead of downloaded phar, bump runner to ubuntu-22.04 - compile.yml: update PHP version from 7.4 to 8.2 https://claude.ai/code/session_01JA2idCjLjHr7dNGMs6CYiv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
PHP 7.4 has been end-of-life since November 2022 (3+ years without security patches). 82%+ of WordPress sites already run PHP 8.x. This PR bumps the minimum to PHP 8.2 — the lowest currently-maintained PHP version — and upgrades the test toolchain accordingly.
Changes
composer.json>=7.3→>=8.2^8.5→^11.0(PHPUnit 8 is EOL; v11 requires PHP 8.2+)phpunit/php-code-coverage(now bundled inside PHPUnit 11)phpunit.xml.dist<coverage><include>migrated to top-level<source>element (PHPUnit 10+ format)convertErrorsToExceptions,convertNoticesToExceptions,convertWarningsToExceptionstestdoxXml,testdoxHtml,text) withjunit.github/workflows/phpunit.yml[7.4, 8.2]→[8.2, 8.3]--ignore-platform-reqsno longer needed)vendor/bin/phpunitinstead of a downloaded pharubuntu-20.04toubuntu-22.04.github/workflows/compile.yml7.4to8.2in both jobsNotes
withConsecutive,getMockBuilder()->setMethods(), etc.) — if test runs surface failures, those test files will need small updatesyoast/phpunit-polyfills ^2.0remains and handles cross-version polyfillingTest plan
composer installand confirm PHPUnit 11 resolves cleanlyvendor/bin/phpunitlocally against PHP 8.2 and confirm test suite passeshttps://claude.ai/code/session_01JA2idCjLjHr7dNGMs6CYiv