Repository navigation
Repair wp/5.8 branch Actions: Swap phpunit/phpunit for a release PHP 5.6 and 7.0 can load - #84456
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 |
7726492 to
78ca33c
Compare
|
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. |
78ca33c to
0fa8063
Compare
0fa8063 to
60a65a1
Compare
wp/5.8 branch Actions: Remove phpunit/phpunit before testing on PHP 5.6 and 7.0wp/5.8 branch Actions: Swap phpunit/phpunit for a release PHP 5.6 and 7.0 can load
60a65a1 to
ac72b5f
Compare
ac72b5f to
31ec0ac
Compare
31ec0ac to
f161058
Compare
Part of #82935.
What?
Adds an "Install a PHPUnit release this PHP version can load" step to the
unit-phpjob ofunit-test.yml. On thePHP 5.6andPHP 7.0legs, after the Composer dependencies are installed, it setsconfig.platform.phpto5.6.20or7.0.33and runscomposer require --dev phpunit/phpunit:<version> --with-all-dependenciesinwp-env'scomposercontainer:^5.7.21on PHP 5.6 (resolves to5.7.27) and^6.5on PHP 7.0 (6.5.14). The tests still run the PHPUnit bundled in those legs'wordpressdevelop/phpunitimages.Why?
wp-env'scomposerservice installs the dev dependencies with its own PHP version, sovendorcontainsphpunit/phpunit7.5.20(#84455) on every leg. The test bootstrap loadsvendor/autoload.php, which autoloads PHPUnit 7.5's classes, and PHP 5.6 and 7.0 can't parse them:Removing
phpunit/phpunitisn't possible:yoast/phpunit-polyfills, which WordPress 5.8's test library requires (#84942), requires it.composer removefails ("Removal failed, phpunit/phpunit is still present"), and re-resolves PHPUnit to9.6.38on the way, which is a fatal error on PHP 5.6. So these legs swap it for the newest release their PHP supports instead. These are the same PHPUnit lines their images ship.The changes to
composer.jsonandcomposer.lockonly exist inside the job.How?
The condition is the same one the
PHPUNITvariable uses to pick the image's PHPUnit.wp/6.0andwp/5.9lock PHPUnit 5.7 for every leg instead, because their test libraries accept the PHPUnit 8.5 and 9.6 that the newer images ship. Here thePHP 7.4andPHP 8.0legs need Composer's PHPUnit 7.5, so the old-PHP legs swap it in the job.PHPUnit 5.7 requires
symfony/yaml, which every 2.x–4.x release blocks on security advisories. #84455 ignores them.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