Skip to content

Commit

Permalink
Merge pull request #6 from rahulsonar-acquia/composer_2
Browse files Browse the repository at this point in the history
composer2
  • Loading branch information
rahulsonar-acquia committed May 25, 2021
2 parents 9abe69a + cfa3437 commit 5b24a30
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions src/Composer/ComposerizeDrupalCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ class ComposerizeDrupalCommand extends BaseCommand
protected $drupalRootRelative;
protected $drupalCoreVersion;

/**
* Composer1 path
*/
protected $composerPath;

/** @var Filesystem */
protected $fs;

Expand All @@ -42,7 +37,6 @@ public function configure()
$this->addOption('composer-root', null, InputOption::VALUE_REQUIRED, 'The relative path to the directory that should contain composer.json.');
$this->addOption('drupal-root', null, InputOption::VALUE_REQUIRED, 'The relative path to the Drupal root directory.');
$this->addOption('exact-versions', null, InputOption::VALUE_NONE, 'Use exact version constraints rather than the recommended caret operator.');
$this->addOption('composer-path', null, InputOption::VALUE_OPTIONAL, 'Composer1 path on the system');
$this->addOption('no-update', null, InputOption::VALUE_NONE, 'Prevent "composer update" being run after file generation.');
$this->addOption('no-gitignore', null, InputOption::VALUE_NONE, 'Prevent root .gitignore file from being modified.');
$this->addUsage('--composer-root=. --drupal-root=./docroot');
Expand All @@ -51,36 +45,6 @@ public function configure()
$this->addUsage('--exact-versions --no-update --no-gitignore');
}

/**
* @param \Symfony\Component\Console\Input\InputInterface $input
* @param \Symfony\Component\Console\Output\OutputInterface $output
*
*/
public function initialize(InputInterface $input, OutputInterface $output)
{
if ($input->getOption('composer-path')) {
$this->composerPath = $input->getOption('composer-path');
} else {
$this->composerPath = 'composer';
}
}

/**
* @return mixed
*/
public function getComposerPath()
{
return $this->composerPath;
}

/**
* @param mixed $composer_path
*/
public function setComposerPath($composer_path)
{
$this->composerPath = $composer_path;
}

/**
* @param \Symfony\Component\Console\Input\InputInterface $input
* @param \Symfony\Component\Console\Output\OutputInterface $output
Expand Down Expand Up @@ -248,7 +212,7 @@ protected function executeComposerUpdate()
$output_callback = function ($type, $buffer) use ($io) {
$io->write($buffer, false);
};
return $executor->execute("{$this->getComposerPath()} update --no-interaction", $output_callback, $this->baseDir);
return $executor->execute("composer update --no-interaction", $output_callback, $this->baseDir);
}

/**
Expand Down

0 comments on commit 5b24a30

Please sign in to comment.