Procházet zdrojové kódy

Only create alias package in repositories on the fly if necessary, fixes #793

Nils Adermann před 13 roky
rodič
revize
4eb5f73718
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      src/Composer/Repository/ArrayRepository.php

+ 4 - 1
src/Composer/Repository/ArrayRepository.php

@@ -105,7 +105,10 @@ class ArrayRepository implements RepositoryInterface
 
         // create alias package on the fly if needed
         if ($package->getAlias()) {
-            $this->addPackage($this->createAliasPackage($package));
+            $alias = $this->createAliasPackage($package);
+            if (!$this->hasPackage($alias)) {
+                $this->addPackage($alias);
+            }
         }
     }