Explorar o código

Fix the platform requirement check command

The command must validate that the current package matches the constraint, not
that any newer package matches it.
Christophe Coevoet %!s(int64=7) %!d(string=hai) anos
pai
achega
e91505ce30
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Composer/Command/CheckPlatformReqsCommand.php

+ 1 - 1
src/Composer/Command/CheckPlatformReqsCommand.php

@@ -82,7 +82,7 @@ EOT
                     $version = $currentPlatformPackageMap[$require]->getVersion();
 
                     foreach ($links as $link) {
-                        if (!$link->getConstraint()->matches(new Constraint('<=', $version))) {
+                        if (!$link->getConstraint()->matches(new Constraint('=', $version))) {
                             $results[] = array(
                                 $currentPlatformPackageMap[$require]->getPrettyName(),
                                 $currentPlatformPackageMap[$require]->getPrettyVersion(),