소스 검색

Remove InputInterface passing from previous commits
- no longer necessary with IOInterface update

Pádraic Brady 11 년 전
부모
커밋
49414a9790
3개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 2 2
      src/Composer/Command/Command.php
  2. 2 2
      src/Composer/Console/Application.php
  3. 3 3
      src/Composer/Factory.php

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

@@ -43,13 +43,13 @@ abstract class Command extends BaseCommand
      * @throws \RuntimeException
      * @return Composer
      */
-    public function getComposer($required = true, $disablePlugins = false, InputInterface $input = null)
+    public function getComposer($required = true, $disablePlugins = false)
     {
         if (null === $this->composer) {
             $application = $this->getApplication();
             if ($application instanceof Application) {
                 /* @var $application    Application */
-                $this->composer = $application->getComposer($required, $disablePlugins, $input);
+                $this->composer = $application->getComposer($required, $disablePlugins);
             } elseif ($required) {
                 throw new \RuntimeException(
                     'Could not create a Composer\Composer instance, you must inject '.

+ 2 - 2
src/Composer/Console/Application.php

@@ -169,11 +169,11 @@ class Application extends BaseApplication
      * @throws JsonValidationException
      * @return \Composer\Composer
      */
-    public function getComposer($required = true, $disablePlugins = false, InputInterface $input = null)
+    public function getComposer($required = true, $disablePlugins = false)
     {
         if (null === $this->composer) {
             try {
-                $this->composer = Factory::create($this->io, null, $disablePlugins, $input);
+                $this->composer = Factory::create($this->io, null, $disablePlugins);
             } catch (\InvalidArgumentException $e) {
                 if ($required) {
                     $this->io->write($e->getMessage());

+ 3 - 3
src/Composer/Factory.php

@@ -185,7 +185,7 @@ class Factory
      * @throws \UnexpectedValueException
      * @return Composer
      */
-    public function createComposer(IOInterface $io, $localConfig = null, $disablePlugins = false, InputInterface $input = null)
+    public function createComposer(IOInterface $io, $localConfig = null, $disablePlugins = false)
     {
         // load Composer configuration
         if (null === $localConfig) {
@@ -444,11 +444,11 @@ class Factory
      * @param  bool     $disablePlugins Whether plugins should not be loaded
      * @return Composer
      */
-    public static function create(IOInterface $io, $config = null, $disablePlugins = false, InputInterface $input = null)
+    public static function create(IOInterface $io, $config = null, $disablePlugins = false)
     {
         $factory = new static();
 
-        return $factory->createComposer($io, $config, $disablePlugins, $input);
+        return $factory->createComposer($io, $config, $disablePlugins);
     }
 
     /**