Repository navigation
Repair wp/5.9 branch Actions: Let the current Composer release install this branch's dependencies - #84406
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
b5f76f6 to
b937983
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. |
b937983 to
f8561a2
Compare
f8561a2 to
cf540dd
Compare
Part of #82934.
What?
Lets the current Composer release install this branch's dependencies:
config.allow-pluginstocomposer.jsonfor the branch's two Composer plugins,composer/installersanddealerdirect/phpcodesniffer-composer-installer.config.platform.php(8.1) and arequire.phpfloor of>=5.6.20tocomposer.json, and updatescomposer.lockto match. No package versions change.wp-env'scomposerservice to thecomposer:2image instead of the floatingcomposerimage (packages/env/lib/build-docker-compose-config.js), with apackages/env/CHANGELOG.mdentry.Why?
wp-env'scomposerservice uses the unversionedcomposerimage, which currently runs Composer 2.10.3 on PHP 8.5.10. Its PHP version doesn't follow the PHP version under test.phpspec/prophecy1.14.0 (required byphpunit/phpunit8.5.21) requiresphp ^7.2 || ~8.0, <8.2. On PHP 8.5,composer installfails with "Your lock file does not contain a compatible set of packages", so every PHP job fails atprelint-php. Declaringconfig.platform.phpmakes Composer check the lock against PHP 8.1 instead of the container's PHP.8.1is the top of this branch's PHPUnit matrix and the newest version belowprophecy's<8.2limit.composer.jsondoesn't allow:composer/installers contains a Composer plugin which is blocked by your allow-plugins config. This also breaks the runner-basedphpcsjob added in Repairwp/5.9branch Actions: Run PHP coding standards on the runner instead of inside wp-env #84405. Both plugins are needed:composer/installerssets this package's install path, anddealerdirect/phpcodesniffer-composer-installerregisters the coding standards with PHP_CodeSniffer.require.php>=5.6.20declares WordPress's minimum supported PHP version, the same floor aswp/6.1.The image is pinned to
composer:2rather than an exact release:composer:2still gets every Composer 2 release, including security fixes, but a future Composer 3 can't change how this branch installs its dependencies until someone updates the tag. The PHP version inside the image still follows the tag (PHP 8.5 today); that doesn't change which packages get installed, becausecomposer.lockdecides that.How?
composer.lockwas updated withcomposer update --lock, so nothing was resolved again. All 37 packages keep the same version and reference. The lock changes are:content-hashplatform-overrides:{ "php": "8.1" }platform:{ "php": ">=5.6.20" }squizlabs/php_codesniffer3.6.1's source and dist URLs, which now point to thePHPCSStandardsorganization (same commit)Testing
In the
composerimage (Composer 2.10.3, PHP 8.5.10),composer install --no-interactionexits2on this PR's base and0with this PR, and registers the three coding standards with PHP_CodeSniffer. In a PHP 7.4.33 container with Composer 2.10.3, thephpcsjob'scomposer installexits1without this PR and0with it.composer:2is currently the same image as the floatingcomposerimage, so these results apply to it.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