diff -Nru php-composer-semver-1.4.1/CHANGELOG.md php-composer-semver-1.4.2/CHANGELOG.md --- php-composer-semver-1.4.1/CHANGELOG.md 2016-06-02 09:04:51.000000000 +0000 +++ php-composer-semver-1.4.2/CHANGELOG.md 2016-08-30 16:08:34.000000000 +0000 @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +### [1.4.2] 2016-08-30 + + * Fixed: collapsing of complex constraints lead to buggy constraints + ### [1.4.1] 2016-06-02 * Changed: branch-like requirements no longer strip build metadata - [composer/semver#38](https://github.com/composer/semver/pull/38). diff -Nru php-composer-semver-1.4.1/debian/changelog php-composer-semver-1.4.2/debian/changelog --- php-composer-semver-1.4.1/debian/changelog 2016-06-04 15:37:07.000000000 +0000 +++ php-composer-semver-1.4.2/debian/changelog 2017-01-26 03:37:16.000000000 +0000 @@ -1,3 +1,10 @@ +php-composer-semver (1.4.2-1) unstable; urgency=medium + + [ Rob Bast ] + * do not collapse ranges if other constraints apply + + -- David Prévot Wed, 25 Jan 2017 17:37:16 -1000 + php-composer-semver (1.4.1-1) unstable; urgency=medium [ Rob Bast ] diff -Nru php-composer-semver-1.4.1/README.md php-composer-semver-1.4.2/README.md --- php-composer-semver-1.4.1/README.md 2016-06-02 09:04:51.000000000 +0000 +++ php-composer-semver-1.4.2/README.md 2016-08-30 16:08:34.000000000 +0000 @@ -59,7 +59,7 @@ The `Composer\Semver\Semver` class provides the following methods: * satisfies($version, $constraints) -* satisfiedBy($constraint, array $versions) +* satisfiedBy(array $versions, $constraint) * sort($versions) * rsort($versions) diff -Nru php-composer-semver-1.4.1/src/VersionParser.php php-composer-semver-1.4.2/src/VersionParser.php --- php-composer-semver-1.4.1/src/VersionParser.php 2016-06-02 09:04:51.000000000 +0000 +++ php-composer-semver-1.4.2/src/VersionParser.php 2016-08-30 16:08:34.000000000 +0000 @@ -265,6 +265,8 @@ // them into one constraint && $orGroups[0] instanceof MultiConstraint && $orGroups[1] instanceof MultiConstraint + && 2 === count($orGroups[0]->getConstraints()) + && 2 === count($orGroups[1]->getConstraints()) && ($a = (string) $orGroups[0]) && substr($a, 0, 3) === '[>=' && (false !== ($posA = strpos($a, '<', 4))) && ($b = (string) $orGroups[1])