瀏覽代碼

Added comment why source link check is necessary

Andreas Schempp 5 年之前
父節點
當前提交
5f202efa0b
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/Composer/Repository/BaseRepository.php

+ 3 - 0
src/Composer/Repository/BaseRepository.php

@@ -68,6 +68,9 @@ abstract class BaseRepository implements RepositoryInterface
             if (!$invert) {
                 $links += $package->getReplaces();
 
+                // On forward search, check if any replaced package was required and add the replaced
+                // packages to the list of needles. Contrary to the cross-reference link check below,
+                // replaced packages are the target of links.
                 foreach ($package->getReplaces() as $link) {
                     foreach ($needles as $needle) {
                         if ($link->getSource() === $needle) {