Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
wp/5.9 branch Actions: Run PHP coding standards on the runner instead of inside wp-env
#84405
f7ccd59 to
fb8c180
Compare
|
Size Change: 0 B Total Size: 1.11 MB ℹ️ View Unchanged
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
wp/5.9 branch Actions: Add a PHP-version test matrixwp/5.9 branch Actions: Add a PHP version test matrix
fb8c180 to
db0b3d1
Compare
|
It looks like the PHP 8.1 jobs run PHP 8.2.
Is that expected? Report: At the top of this stack (#85103), both 8.1 jobs set On this branch, wp-env picks the PHPUnit Docker image from a list of PHP versions that stops at 8.0. PHP 8.1 isn't in the list, so it falls through to WordPress 5.9 doesn't support PHP 8.2, and You could fix it in this PR, as trunk did in #46510 (9ee17a7). In - } else if ( testsPhpVersion === '8.0' ) {
+ } else if ( [ '8.0', '8.1' ].indexOf( testsPhpVersion ) >= 0 ) {
phpunitTag = '9' + phpunitPhpVersion;That selects Take only the 8.1 part of trunk's change. Trunk's change also moves 7.3 and 7.4 to PHPUnit 9, which this branch doesn't need. |
There was a problem hiding this comment.
🟡 Changes recommended
The PHP 8.1 jobs select a floating PHPUnit image rather than guaranteeing PHP 8.1 coverage.
1 open issue
What changed in this PR
Adds a PHP test matrix as part of restoring automated testing on wp/5.9.
Changes:
- Tests five PHP versions through
WP_ENV_PHP_VERSION. - Splits single-site and multisite tests into separate matrix jobs.
| File | Description |
|---|---|
.github/workflows/unit-test.yml |
Adds ten PHP test combinations with conditional test steps. |
Review effort: Balanced


Part of #82934.
What?
Runs the PHPUnit job in
unit-test.ymlacross a PHP version matrix:5.6,7.0,7.4,8.0and8.1, each as a single site and a multisite leg.WP_ENV_PHP_VERSIONis set from the matrix.wp-envuses it to pick thewordpressdevelop/phpunitimage the tests run in. That map has no8.1entry on this branch, so the8.1legs run PHP 8.2 until Repairwp/5.9branch Actions: Use PHPUnit 9 for PHP 7.3 through 8.2 #85297, directly above this one, adds it.Why?
.wp-env.jsonsets nophpVersion, so the job ran once, on whatever PHP version the floatingwordpressimages use, which this branch was never written for. The matrix tests the lowest and highest supported minor version of each major PHP version.How?
This branch's
packages/envalready readsWP_ENV_PHP_VERSION, so only the workflow changes. Composer still installs dependencies insidewp-env'scomposercontainer, from the committedcomposer.lock. Related PRs in this stack:wp/5.9branch Actions: Use PHPUnit 9 for PHP 7.3 through 8.2 #85297 fixes the PHPUnit image map, so the8.1legs run on PHP 8.1 and the7.4legs use PHPUnit 9.wp/5.9branch Actions: Remove thespatie/phpunit-watcherdev dependency #84404 removesspatie/phpunit-watcher, which breaks the5.6and7.0legs.wp/5.9branch Actions: Run PHP coding standards on the runner instead of inside wp-env #84405 moves PHP coding standards checks into their own job. Until then, the lint step runs on every leg.wp/5.9branch Actions: Let the current Composer release install this branch's dependencies #84406 adds aconfig.platform.phpof8.1tocomposer.json, so the current Composer release installs this branch's dependencies.wp/5.9branch Actions: Pinphpunit/phpunitto a PHP 5.6/7.0-compatible release #84415 pinsphpunit/phpunitto a release that supports PHP 5.6 and 7.0, and lowersconfig.platform.phpto5.6.20.Use of AI Tools
This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.
🤖 Generated with Claude Code