Skip to content

Fix RC stability suffix getting an extra -dev in < and >= constraints - #187

Merged
Seldaek merged 1 commit into
composer:mainfrom
Seldaek:fix-rc-constraint-dev-suffix
Sep 24, 2026
Merged

Seldaek merged 1 commit into
composer:mainfrom
Seldaek:fix-rc-constraint-dev-suffix

Conversation

@Seldaek

@Seldaek Seldaek commented Sep 24, 2026

Copy link
Copy Markdown
Member

The check for an explicit stability suffix lowercased the version but matched it against a case-sensitive regex containing "RC", so it never matched. >=1.0-RC1 was parsed as >=1.0.0.0-RC1-dev whereas >=1.0-beta1 correctly gave >=1.0.0.0-beta1.

The check for an explicit stability suffix lowercased the version but
matched it against a case-sensitive regex containing "RC", so it never
matched. `>=1.0-RC1` was parsed as `>=1.0.0.0-RC1-dev` whereas
`>=1.0-beta1` correctly gave `>=1.0.0.0-beta1`.
@Seldaek
Seldaek merged commit 9ee1a95 into composer:main Sep 24, 2026
19 checks passed
@Seldaek
Seldaek deleted the fix-rc-constraint-dev-suffix branch September 24, 2026 07:32
danog added a commit to danog/SecurityAdvisoriesBuilder that referenced this pull request Oct 21, 2026
composer/semver 3.5.0 (composer/semver#187) stopped adding a `-dev`
suffix to `>=`/`<` constraints on RC versions. Update test
expectations accordingly and require the new version, so the
lowest/locked/latest dependency sets all behave the same.

Claude-Session: https://claude.ai/code/session_01H6sGqzAHBMJGoz2xuNBzp8
ChristopherTuring pushed a commit to PreventiveMeasures/libraries that referenced this pull request Nov 3, 2026
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
ChALkeR pushed a commit to PreventiveMeasures/libraries that referenced this pull request Nov 3, 2026
…388)

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.


Claude-Session: https://claude.ai/code/session_01M1K1Mt8jcz94iFhsJAEpzU

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant