Skip to content

fix(version): read a pre-release before a feature as a range bound - #162

Merged
roxblnfk merged 1 commit into
1.xfrom
fix/prerelease-feature-constraint
Oct 12, 2026
Merged

roxblnfk merged 1 commit into
1.xfrom
fix/prerelease-feature-constraint

Conversation

@roxblnfk

Copy link
Copy Markdown
Member

🔍 What was changed

  • A range with a pre-release and a feature suffix — ^3.5.0-beta.1-feature, ~…, >=…, a glued ^3.5.0-rc1-feature, with or without @stability — matched nothing; it now reads like the same range without the feature plus the feature filter: the pre-release is the lower bound and the minimum stability, and the tag must contain the feature.
  • The exact form 3.5.0-beta.1-feature already matched only its own tag since feat(version): match version constraints with DLoad's own ordering #155; it is covered by tests now.
  • A bare keyword before a feature (^2.0-beta-feature) is a bound too, as in ^2.0-beta@alpha: with @alpha, 2.0.0-alpha.1-feature stays below the bound, while 2.1.0-alpha.1-feature matches.

Checklist

A constraint like `^3.5.0-beta.1-feature` took the whole `beta.1-feature` as the feature, while a tag keeps only `feature` as its suffix, so the constraint matched nothing.

The pre-release now bounds the range and sets the minimum stability, as it does without a feature, and the rest filters by the feature.

Closes #151

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added bug Something isn't working enhancement New feature or request tests labels Oct 12, 2026
@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/Module/Version/Constraint.php 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roxblnfk
roxblnfk merged commit 3faa49a into 1.x Oct 12, 2026
23 checks passed
@roxblnfk
roxblnfk deleted the fix/prerelease-feature-constraint branch October 12, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A constraint with a pre-release and a feature suffix matches nothing

1 participant