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; } }