Эх сурвалжийг харах

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

Nils Adermann 13 жил өмнө
parent
commit
4eb5f73718

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