Repository navigation
lockfile: Composer 2.11's <1.0-RC1 and >=1.0-RC1, without -dev - #388
Merged
Merged
Conversation
composer/semver 3.5 (composer/semver#187), which Composer 2.11 ships, matches the modifier of a `<` or `>=` constraint caselessly instead of on the lowered text, so `-RC1` now counts as a modifier the way `-beta1` already did, and no `-dev` is added. GitHub's runners now have Composer 2.11, so the differential test failed on `>=1p3 <1-RC1|trunk`. The port follows 3.5 and later. Against an older Composer, which the test detects by asking it, constraints with an `rc` in them are left out of the comparison. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01M1K1Mt8jcz94iFhsJAEpzU
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Why CI failed on #387
The
testjob on #387 failed inlockfile/tests/composer/differential.test.json a Composer constraint. #387 only changedrn/, so the failure has nothing to do with it:The differential test uses whichever
composeris onPATHas its reference, and on GitHub's runners that is the one in theubuntu-latestimage. Composer 2.11.0 came out on 2026-10-29 and bundles composer/semver 3.6.0. Composer 2.10.3 bundles 3.4.4. composer/semver 3.5.0 changed this on purpose (composer/semver#187):The old check lowercased the operand, so
-rc1never matched the regex'sRC, and</>=on an RC version got-devadded. Beta and alpha versions did not. Now RC is handled the same way as beta and alpha. Once the runner image picked up Composer 2.11, every PR's CI, andmain, failed on this case.Change
src/composer/semver.js: the port now follows composer/semver 3.5 and later.MODIFIEDmatches caselessly, usingiwithoutuso that only ASCII letters fold, as in PCRE. It tests the operand as written instead of lowercased.<1-RC1now reads as< 1.0.0.0-RC1.tests/composer/differential.test.js: same pattern as the existingbefore84check for PHP'sversion_compare. The test asks the reference Composer how it reads<1-RC1. If that Composer is older than 2.11, constraints containingrcare left out of the constraint-reading test and the matching test. Composer 2.11 and later still compare every constraint.The port has no counterpart to the other changes in composer/semver 3.5 and 3.6:
Intervalscompaction,MultiConstraintbounds,CompilingMatchercaching andisValid(). Nothing else needed to change.Checks
node --run lintpasses.Generated by Claude Code