소스 검색

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

Jordi Boggiano 13 년 전
부모
커밋
35aa82ada8
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      src/Composer/Package/BasePackage.php

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