浏览代码

Use updateAll request method in upddate mode in install command

Nils Adermann 13 年之前
父节点
当前提交
509188c112
共有 1 个文件被更改,包括 2 次插入7 次删除
  1. 2 7
      src/Composer/Command/InstallCommand.php

+ 2 - 7
src/Composer/Command/InstallCommand.php

@@ -119,14 +119,9 @@ EOT
             $installedPackages = $installedRepo->getPackages();
             $links = $this->collectLinks($composer->getPackage(), $noInstallRecommends, $installSuggests);
 
-            foreach ($links as $link) {
-                foreach ($installedPackages as $package) {
-                    if ($package->getName() === $link->getTarget()) {
-                        $request->update($package->getName(), new VersionConstraint('=', $package->getVersion()));
-                        break;
-                    }
-                }
+            $request->updateAll();
 
+            foreach ($links as $link) {
                 $request->install($link->getTarget(), $link->getConstraint());
             }
         } elseif ($composer->getLocker()->isLocked()) {