1
0
Fork 0

Fix regression introduced in beb9a5bd72

pull/1243/head
Jordi Boggiano 2012-10-21 19:16:11 +02:00
parent 76663cf21e
commit eceda0ffc7
1 changed files with 17 additions and 0 deletions

View File

@ -387,6 +387,23 @@ class Pool
$replaces = $candidate->getReplaces();
}
// aliases create multiple replaces/provides for one target so they can not use the shortcut
if (isset($replaces[0]) || isset($provides[0])) {
foreach ($provides as $link) {
if ($link->getTarget() === $name && $constraint->matches($link->getConstraint())) {
return self::MATCH_PROVIDE;
}
}
foreach ($replaces as $link) {
if ($link->getTarget() === $name && $constraint->matches($link->getConstraint())) {
return self::MATCH_REPLACE;
}
}
return self::MATCH_NONE;
}
if (isset($provides[$name]) && $constraint->matches($provides[$name]->getConstraint())) {
return self::MATCH_PROVIDE;
}