Explorar o código

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

Nils Adermann %!s(int64=13) %!d(string=hai) anos
pai
achega
4eb5f73718
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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);
+            }
         }
     }