浏览代码

Fix a few bugs, fixes #1867

Jordi Boggiano 12 年之前
父节点
当前提交
8a06e461e5

+ 1 - 1
src/Composer/Command/ArchiveCommand.php

@@ -95,7 +95,7 @@ EOT
             $repos = new CompositeRepository(array_merge(array($localRepo), $composer->getRepositoryManager()->getRepositories()));
             $repos = new CompositeRepository(array_merge(array($localRepo), $composer->getRepositoryManager()->getRepositories()));
         } else {
         } else {
             $defaultRepos = Factory::createDefaultRepositories($this->getIO());
             $defaultRepos = Factory::createDefaultRepositories($this->getIO());
-            $output->writeln('No composer.json found in the current directory, searching packages from ' . implode(', ', array_keys($defaultRepos)));
+            $io->write('No composer.json found in the current directory, searching packages from ' . implode(', ', array_keys($defaultRepos)));
             $repos = new CompositeRepository($defaultRepos);
             $repos = new CompositeRepository($defaultRepos);
         }
         }
 
 

+ 2 - 2
src/Composer/Config/JsonConfigSource.php

@@ -81,7 +81,7 @@ class JsonConfigSource implements ConfigSourceInterface
      */
      */
     public function addLink($type, $name, $value)
     public function addLink($type, $name, $value)
     {
     {
-        $this->manipulateJson('addLink', $type, $name, $value, function (&$config, $key) {
+        $this->manipulateJson('addLink', $type, $name, $value, function (&$config, $type, $name, $value) {
             $config[$type][$name] = $value;
             $config[$type][$name] = $value;
         });
         });
     }
     }
@@ -91,7 +91,7 @@ class JsonConfigSource implements ConfigSourceInterface
      */
      */
     public function removeLink($type, $name)
     public function removeLink($type, $name)
     {
     {
-        $this->manipulateJson('removeSubNode', $type, $name, function (&$config, $key) {
+        $this->manipulateJson('removeSubNode', $type, $name, function (&$config, $type, $name) {
             unset($config[$type][$name]);
             unset($config[$type][$name]);
         });
         });
     }
     }

+ 2 - 2
src/Composer/Downloader/PearPackageExtractor.php

@@ -194,7 +194,7 @@ class PearPackageExtractor
         }
         }
     }
     }
 
 
-    private function buildSourceList10($children, $targetRoles, $source = '', $target = '', $role = null, $packageName)
+    private function buildSourceList10($children, $targetRoles, $source, $target, $role, $packageName)
     {
     {
         $result = array();
         $result = array();
 
 
@@ -224,7 +224,7 @@ class PearPackageExtractor
         return $result;
         return $result;
     }
     }
 
 
-    private function buildSourceList20($children, $targetRoles, $source = '', $target = '', $role = null, $packageName)
+    private function buildSourceList20($children, $targetRoles, $source, $target, $role, $packageName)
     {
     {
         $result = array();
         $result = array();