Prevent multiple replaces of a same package to be skipped when the first fails to match

main
Jordi Boggiano 13 years ago
parent c425b8b6cb
commit 35aa82ada8

@ -118,14 +118,14 @@ abstract class BasePackage implements PackageInterface
}
foreach ($this->getProvides() as $link) {
if ($link->getTarget() === $name) {
return $constraint->matches($link->getConstraint());
if ($link->getTarget() === $name && $constraint->matches($link->getConstraint())) {
return true;
}
}
foreach ($this->getReplaces() as $link) {
if ($link->getTarget() === $name) {
return $constraint->matches($link->getConstraint());
if ($link->getTarget() === $name && $constraint->matches($link->getConstraint())) {
return true;
}
}

Loading…
Cancel
Save