Repository navigation
Merged
Conversation
The two InstalledTest helpers that checked RR_VERSION precedence over `rr --version` were never discovered by Testo; they now run as tests. Two skipped tests document bugs found along the way: Package derives the minimum of `^2025.1 || ^3.0` as 3.0 instead of 2025.1, and Comparator::compare() mis-orders unnormalized input such as `v3.0.1` or `3.0`. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
Composer orders 3.0 below 2023.1, so a package requiring `^2025.1 || ^3.0` made 3.0 the required minimum and rejected an installed 2025.x. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Within a release line the raw strings went to composer/semver, so direct callers got `v3.0.1` older than `3.0.0` and `3.0` older than `3.0.0`. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Comparator::compare()
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.
Fixes two bugs in RoadRunner version ordering found while raising test coverage.
||constraint is now the lowest alternative in RoadRunner release order (2.x < 2023–2025 < 3.x). Before, composer's numeric order made"spiral/roadrunner": "^2025.1 || ^3.0"require 3.0 and reject an installed 2025.x.Comparator::compare()normalizes its arguments, so direct callers get the same answer asgreaterThan()/lessThan()/equal():v3.0.1is newer than3.0.0,3.0equals3.0.0, and a release is newer than its own-dev. Unparsable input now throws\UnexpectedValueException, as the instance methods already did.Tests
Line coverage 86.3% → 99.3% (120/139 → 148/149 statements), every method covered. Tests 119 → 162.
Newly covered:
Package::getRequiredVersions()against fixture packages loaded throughInstalledVersions::reload(),Process::exec()with a real PHP subprocess,Installedwith a missing executable, and version edge cases (vprefixes, release candidates,dev-master,*,greaterThan('0')).The
InstalledTesthelpers checking thatRR_VERSIONwins overrr --versionwere never run by Testo; they are tests now. TheInstalledtests also no longer readRR_VERSIONfrom the CI environment.RequiredTest::testGetRequiredVersionexpected2.0.0.0-devto beat2.0, which only held whilecompare()skipped normalization; it now expects2.0.Left uncovered:
Packageskipping acomposer.jsonthat exists but cannot be read.How was this tested: