Closed Seldaek closed 4 years ago
All tests now passing.
https://github.com/composer/semver/pull/97/commits/5aef5c27d3f30e68651945bf7e2bfb817f9e46df adds a new isIntersectionOf method which could theoretically replace ConstraintInterface::matches() but I doubt it's as efficient so maybe not. We need to test and see. Anyway it was a great experiment as it allowed me to fix a few more edge cases in the intervals generation.
@naderman would be happy to get your opinion on https://github.com/composer/semver/pull/97/commits/67b8bb55c5426b0c3bf9e20e8e69b9972c92f4d6 and https://github.com/composer/semver/pull/97/commits/0b0edb398d272be11774c223dc3e2d030d7898d3 especially
I still think it'd be better to have an actual Interval class rather than these arrays with start/end attributes which essentially act like an untyped object.
Fixed all feedback.
Ok all tests passing except one now, which is technically a valid result but not really what I'd like it to return.. @Toflar if you'd like to try and use this latest version in your Composer PR feel free.