浏览代码

Fix variable name

Jordi Boggiano 6 年之前
父节点
当前提交
d381b3a781
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/Composer/Repository/ComposerRepository.php

+ 3 - 1
src/Composer/Repository/ComposerRepository.php

@@ -313,9 +313,11 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
                         }
                         }
                     }
                     }
                 }
                 }
+
+                // add aliases of matched packages even if they did not match the constraint
                 foreach ($candidates as $candidate) {
                 foreach ($candidates as $candidate) {
                     if ($candidate instanceof AliasPackage) {
                     if ($candidate instanceof AliasPackage) {
-                        if (isset($result[spl_object_hash($candidate->getAliasOf())])) {
+                        if (isset($matches[spl_object_hash($candidate->getAliasOf())])) {
                             $matches[spl_object_hash($candidate)] = $candidate;
                             $matches[spl_object_hash($candidate)] = $candidate;
                         }
                         }
                     }
                     }