Repository navigation
Repair wp/6.8 branch Actions: Fix the Composer PHP platform override breaking unit tests on older PHP - #82887
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. 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
7b71bd7 to
e13bc3a
Compare
|
Size Change: 0 B Total Size: 1.85 MB ℹ️ View Unchanged
|
e13bc3a to
f6de9f6
Compare
f6de9f6 to
b5df840
Compare
b5df840 to
62a9094
Compare
62a9094 to
44cd766
Compare
44cd766 to
ac11162
Compare
wp/6.8 branch Actions: Fix Composer PHP platform value override breaking unit tests in older PHP versionswp/6.8 branch Actions: Fix the Composer PHP platform override breaking unit tests on older PHP
ac11162 to
362bc88
Compare
362bc88 to
b62be67
Compare
Part of #82786.
What?
Removes
unit-test.yml's "Override PHP version in composer.json" step andcomposer.json'sconfig.platform.phpvalue, replacing them with an explicitrequire.php: ">=7.2.24"constraint.Why?
The override step ran
composer config platform.php ${{ matrix.php }}, settingplatform.phpto the bare version string for each matrix leg (e.g.7.2). Composer normalizes a bare major.minor value tomajor.minor.0.0for dependency resolution, which is below the>=7.2.5minimum required bysymfony/consoleandsymfony/process(both pulled in byspatie/phpunit-watcher) — even though the actual PHP interpreter installed for that job (viashivammathur/setup-php) is a current7.2.xpatch release well above7.2.5. This made thePHP 7.2job inunit-test.ymlfail outright with "Your requirements could not be resolved to an installable set of packages."How?
This is a direct port of commit d2eb077 ("Unit testing: Allow Composer to auto-detect PHP version", WordPress/gutenberg#73358), merged to trunk 2025-11-18 and already present on
wp/6.9.wp/6.8was cut before that fix landed. The resultingcomposer.jsonis byte-identical to the upstream fix's version.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.