1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 00:53:06 +00:00

Fix the platform requirement check command

The command must validate that the current package matches the constraint, not
that any newer package matches it.
This commit is contained in:
Christophe Coevoet 2017-12-20 12:17:16 +01:00
parent f494f4942d
commit e91505ce30

View file

@ -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(),