Repository navigation
Repair wp/6.0 branch Actions: Resolve Composer dependencies against the lowest tested PHP version - #84282
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 |
|
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. |
1dc415c to
37278ce
Compare
37278ce to
995afb2
Compare
|
Size Change: 0 B Total Size: 1.23 MB ℹ️ View Unchanged
|
995afb2 to
6032f63
Compare
|
Size Change: 0 B Total Size: 1.23 MB ℹ️ View Unchanged
|
6032f63 to
db5ff30
Compare
…the tests run under.
db5ff30 to
f7c03ed
Compare
ntsekouras
left a comment
There was a problem hiding this comment.
LGTM, thanks! Keeping the platform here makes sense, since this is the only branch with a lock installed from the wp-env container.
Part of #82933.
What?
Makes Composer resolve this branch's dependencies against PHP
5.6.20, the lowest PHP version the unit-test matrix runs and WordPress's minimum PHP version for this release:composer.json'sconfig.platform.phpfrom7.4to5.6.20."php": ">=5.6.20"torequire.composer.lockwithcomposer update phpunit/phpunit --with-all-dependencies. The only package changes are:symfony/yamlv4.4.45→v3.4.47doctrine/instantiator1.5.0→1.0.5myclabs/deep-copy1.13.4→1.7.0phpdocumentor/reflection-common2.2.0→1.0.1phpdocumentor/reflection-docblock5.6.7→3.3.2phpdocumentor/type-resolver1.12.0→0.4.0phpunit/php-token-stream2.0.2→1.4.12symfony/polyfill-ctypev1.37.0→v1.19.0webmozart/assert1.12.1→1.9.1doctrine/deprecationsphpstan/phpdoc-parserThis is the
wp/6.0counterpart of #84251 (wp/6.1) and #84227 (wp/6.2).Why?
With the platform set to
7.4, Composer installssymfony/yaml4.4, which requires PHP 7.1. ThePHP 7.0jobs run the PHPUnit6.5phar from the wp-env image, and the plugin's Composer autoloader is registered in front of the phar's own. When PHPUnit prints a failure diff, it loadsSymfony\Component\Yaml\Yamlfrom the plugin'svendordirectory, and PHP 7.0 cannot parse it. Every failing assertion then becomes a fatal error on thePHP 7.0jobs:Resolving against
5.6.20picks versions that every job in the matrix can load.How?
#84251 and #84227 remove
config.platform.phpentirely and let Composer detect the running PHP version. That doesn't work here. Those branches have nocomposer.lockand runcomposer installon the runner at the job's own PHP version. This branch commits acomposer.lockand installs inside wp-env'scomposercontainer, which runs PHP8.5. Without a platform value,composer installwould check the lock against PHP8.5and reject it, because PHPUnit5.7and its dependencies don't allow PHP 8. So this branch keepsconfig.platform.php, sets it to the lowest PHP version the tests run under, and adds the samerequire.phpfloor as the other branches.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