All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
X || Y, >=Y.1
and other such complex constructs were in some cases being optimized into a more restrictive constraintx || @dev
, not very useful but seen in the wild and failed to validate with 1.5.2/1.6.0foobar-dev
being equal to dev-foobar
, dev-foobar is the official way to write it but we need to support the other for BC and convenience^2.x-dev
and ~2.x-dev
, not very useful but seen in the wild and failed to validate with 3.0.1EmptyConstraint
, replace it with MatchAllConstraint
*.*
and such variants will not match all dev-*
versions anymore, only *
doesIntervals
class to check if a constraint is a subsets of another one, and allow compacting complex MultiConstraints into simpler onesCompilingMatcher
class to speed up constraint matching against simple Constraint instancesMatchAllConstraint
and MatchNoneConstraint
which match everything and nothingdev-master
, dev-trunk
and dev-default
now normalize to dev-master
, dev-trunk
and dev-default
instead of 9999999-dev
in 1.xAbstractConstraint
getUpperBound
and getLowerBound
to ConstraintInterface. They return Composer\Semver\Constraint\Bound
instancesMultiConstraint::create
to create the most-optimal form of ConstraintInterface from an array of constraint stringsx || @dev
, not very useful but seen in the wild and failed to validate with 1.5.2/1.6.0foobar-dev
being equal to dev-foobar
, dev-foobar is the official way to write it but we need to support the other for BC and convenience^2.x-dev
and ~2.x-dev
, not very useful but seen in the wild and failed to validate with 1.5.2~
operator~
operator was inconsistenttest
namespace.ConstraintInterface
relaxed, setPrettyString is not required anymore.AbstractConstraint
marked deprecated, will be removed in 2.0.Constraint
is now extensible.VersionConstraint
renamed to Constraint
.SpecificConstraint
renamed to AbstractConstraint
.LinkConstraintInterface
renamed to ConstraintInterface
.VersionParser::parseNameVersionPairs
was removed.VersionParser::parseConstraints
allows (but ignores) build metadata now.VersionParser::parseConstraints
allows (but ignores) prefixing numeric versions with a 'v' now.Comparator::compare
no longer throws InvalidArgumentException
.Constraint
now throws InvalidArgumentException
.Composer\Semver\Comparator
, various methods to compare versions.Composer\Package\Version
-> Composer\Semver
Composer\Package\LinkConstraint
-> Composer\Semver\Constraint
Composer\Test\Package\Version
-> Composer\Test\Semver
Composer\Test\Package\LinkConstraint
-> Composer\Test\Semver\Constraint