Remove InputInterface passing from previous commits
- no longer necessary with IOInterface updatepull/2745/head
parent
470fb58273
commit
49414a9790
|
@ -43,13 +43,13 @@ abstract class Command extends BaseCommand
|
||||||
* @throws \RuntimeException
|
* @throws \RuntimeException
|
||||||
* @return Composer
|
* @return Composer
|
||||||
*/
|
*/
|
||||||
public function getComposer($required = true, $disablePlugins = false, InputInterface $input = null)
|
public function getComposer($required = true, $disablePlugins = false)
|
||||||
{
|
{
|
||||||
if (null === $this->composer) {
|
if (null === $this->composer) {
|
||||||
$application = $this->getApplication();
|
$application = $this->getApplication();
|
||||||
if ($application instanceof Application) {
|
if ($application instanceof Application) {
|
||||||
/* @var $application Application */
|
/* @var $application Application */
|
||||||
$this->composer = $application->getComposer($required, $disablePlugins, $input);
|
$this->composer = $application->getComposer($required, $disablePlugins);
|
||||||
} elseif ($required) {
|
} elseif ($required) {
|
||||||
throw new \RuntimeException(
|
throw new \RuntimeException(
|
||||||
'Could not create a Composer\Composer instance, you must inject '.
|
'Could not create a Composer\Composer instance, you must inject '.
|
||||||
|
|
|
@ -169,11 +169,11 @@ class Application extends BaseApplication
|
||||||
* @throws JsonValidationException
|
* @throws JsonValidationException
|
||||||
* @return \Composer\Composer
|
* @return \Composer\Composer
|
||||||
*/
|
*/
|
||||||
public function getComposer($required = true, $disablePlugins = false, InputInterface $input = null)
|
public function getComposer($required = true, $disablePlugins = false)
|
||||||
{
|
{
|
||||||
if (null === $this->composer) {
|
if (null === $this->composer) {
|
||||||
try {
|
try {
|
||||||
$this->composer = Factory::create($this->io, null, $disablePlugins, $input);
|
$this->composer = Factory::create($this->io, null, $disablePlugins);
|
||||||
} catch (\InvalidArgumentException $e) {
|
} catch (\InvalidArgumentException $e) {
|
||||||
if ($required) {
|
if ($required) {
|
||||||
$this->io->write($e->getMessage());
|
$this->io->write($e->getMessage());
|
||||||
|
|
|
@ -185,7 +185,7 @@ class Factory
|
||||||
* @throws \UnexpectedValueException
|
* @throws \UnexpectedValueException
|
||||||
* @return Composer
|
* @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
|
// load Composer configuration
|
||||||
if (null === $localConfig) {
|
if (null === $localConfig) {
|
||||||
|
@ -444,11 +444,11 @@ class Factory
|
||||||
* @param bool $disablePlugins Whether plugins should not be loaded
|
* @param bool $disablePlugins Whether plugins should not be loaded
|
||||||
* @return Composer
|
* @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();
|
$factory = new static();
|
||||||
|
|
||||||
return $factory->createComposer($io, $config, $disablePlugins, $input);
|
return $factory->createComposer($io, $config, $disablePlugins);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue