Browse Source

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

Nils Adermann 13 years ago
parent
commit
4eb5f73718
1 changed files with 4 additions and 1 deletions
  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);
+            }
         }
     }