From 35aa82ada8ce813af3c417583ccef0ebb50af922 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 26 Feb 2012 22:21:32 +0100 Subject: [PATCH] Prevent multiple replaces of a same package to be skipped when the first fails to match --- src/Composer/Package/BasePackage.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Composer/Package/BasePackage.php b/src/Composer/Package/BasePackage.php index 6bd279ecb..b094779d5 100644 --- a/src/Composer/Package/BasePackage.php +++ b/src/Composer/Package/BasePackage.php @@ -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; } }