Repository navigation
Repair wp/6.7 branch Actions: Fix Composer PHP platform value override breaking unit tests in older PHP versions - #122
Closed
desrosj wants to merge 1 commit into
Conversation
desrosj
removed this pull request from stack #90
September 10, 2026 19:33
desrosj
force-pushed
the
fix-actions-6.7/fix-composer-platform-override
branch
from
September 10, 2026 19:35
1e84904 to
a1822d4
Compare
desrosj
added this pull request to stack #185
September 10, 2026 19:36
desrosj
force-pushed
the
fix-actions-6.7/fix-composer-platform-override
branch
from
September 10, 2026 23:57
a1822d4 to
a23ad34
Compare
desrosj
force-pushed
the
fix-actions-6.7/fix-composer-platform-override
branch
from
September 11, 2026 00:28
a23ad34 to
87ce83e
Compare
desrosj
force-pushed
the
fix-actions-6.7/fix-composer-platform-override
branch
from
September 11, 2026 01:14
87ce83e to
9ba02ff
Compare
desrosj
force-pushed
the
fix-actions-6.7/fix-composer-platform-override
branch
from
September 11, 2026 02:19
9ba02ff to
d9c87ab
Compare
desrosj
marked this pull request as ready for review
September 11, 2026 02:44
desrosj
marked this pull request as draft
September 11, 2026 03:22
|
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. |
desrosj
force-pushed
the
fix-actions-6.7/fix-composer-platform-override
branch
from
September 14, 2026 01:48
d9c87ab to
08ec647
Compare
The "Override PHP version in composer.json" step in `unit-test.yml` set Composer's `platform.php` config to the matrix's bare PHP version string (e.g. `7.2`). Composer normalizes a bare major.minor value to `X.Y.0.0` for dependency resolution, which falls below the `>=7.2.5` minimum required by `symfony/console`/`symfony/process` (pulled in transitively by `spatie/phpunit-watcher`). This caused `composer update` to fail with "Your requirements could not be resolved to an installable set of packages" for the PHP 7.2 matrix leg, even though the actual PHP interpreter installed for that job via `shivammathur/setup-php` was a legitimate `7.2.x` patch release that satisfied the requirement fine. This branch's minimum supported PHP version, per `gutenberg.php`'s `Requires PHP` header, is `7.2`. Instead of overriding `platform.php` with an easy-to-underspecify bare version, remove `config.platform.php` from `composer.json` entirely and add an explicit `require.php: ">=7.2.24"` constraint, so Composer resolves against whatever PHP is genuinely running the job. The `>=7.2.24` floor was chosen so every matrix leg (`7.2`, `7.3`, `7.4`, `8.0`, `8.1`, `8.2`) resolves cleanly.
desrosj
force-pushed
the
fix-actions-6.7/fix-composer-platform-override
branch
from
September 14, 2026 19:10
08ec647 to
55b3235
Compare
desrosj
marked this pull request as ready for review
September 14, 2026 19:29
desrosj
marked this pull request as draft
September 14, 2026 19:31
desrosj
marked this pull request as ready for review
September 14, 2026 19:38
Owner
Author
|
Migrated to real upstream: WordPress#82902. Closing this fork PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
d2eb077a23068b93490a13bf1590f4d58d14ea2f("Unit testing: Allow Composer to auto-detect PHP version", WordPress/gutenberg#73358), merged to trunk 2025-11-18 and already present onwp/6.9/wp/6.8. This branch's own minimum-PHP value (7.2, confirmed viagutenberg.php'sRequires PHPheader) and dependency graph were independently tested and produce the same>=7.2.24floor trunk's fix used (the exact technical resolution floor is>=7.2.5;7.2.24matches the safety margin used onwp/6.8/wp/6.6). Verified locally by simulating dependency resolution for every one of this branch's PHP matrix legs (7.2,7.3,7.4,8.0,8.1,8.2) withcomposer update --dry-run, using realistic patch versions for each — all resolve cleanly with this change applied.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.