Use sebastian/version-requirement#6765
Draft
sebastianbergmann wants to merge 2 commits into
Draft
Conversation
API Surface ChangesIf any of the additions below are not intended as public API, mark them with Removed API SurfaceMethods
Modified API SurfaceMethods
|
7697ee1 to
ea25442
Compare
2f7c953 to
574fb63
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6765 +/- ##
============================================
- Coverage 97.65% 97.65% -0.01%
+ Complexity 8969 8966 -3
============================================
Files 881 881
Lines 27565 27553 -12
============================================
- Hits 26919 26906 -13
- Misses 646 647 +1 ☔ View full report in Codecov by Harness. |
The version-requirement parsing, operator validation, and satisfaction checking are delegated to sebastian/version-requirement, but the package is fully encapsulated behind PHPUnit-owned value objects. The value objects exposed through events (Requirement and its subtypes via test metadata, VersionComparisonOperator via the configuration) are now pure data transfer objects: they hold only scalar values, aggregate no objects from the package, and carry no behavior. The satisfaction check (isSatisfiedBy()) has moved to Metadata\Api\Requirements, which is where the package is used. As the value objects no longer hold package objects, they serialize cleanly across separate-process test runs. The package is referenced at exactly three boundaries: Requirement::from() (parsing), VersionComparisonOperator (operator validation), and Requirements::isSatisfiedBy() (satisfaction checking). Package exceptions are converted to PHPUnit exceptions at those boundaries so they do not leak either.
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.
Requested by @staabm in sebastianbergmann/version-requirement#1.