reverted command interfaces for installer refactoring

main
digitalkaoz 12 years ago
parent 673dd6312b
commit a4f6314daa

@ -32,7 +32,7 @@ class InstallCommand extends Command
->setDefinition(array( ->setDefinition(array(
new InputOption('prefer-source', null, InputOption::VALUE_NONE, 'Forces installation from package sources when possible, including VCS information.'), new InputOption('prefer-source', null, InputOption::VALUE_NONE, 'Forces installation from package sources when possible, including VCS information.'),
new InputOption('dry-run', null, InputOption::VALUE_NONE, 'Outputs the operations but will not execute anything (implicitly enables --verbose).'), new InputOption('dry-run', null, InputOption::VALUE_NONE, 'Outputs the operations but will not execute anything (implicitly enables --verbose).'),
new InputOption('install-recommends', null, InputOption::VALUE_NONE, 'Also install recommended packages (ignored when installing from an existing lock file).'), new InputOption('no-install-recommends', null, InputOption::VALUE_NONE, 'Do not install recommended packages (ignored when installing from an existing lock file).'),
new InputOption('install-suggests', null, InputOption::VALUE_NONE, 'Also install suggested packages (ignored when installing from an existing lock file).'), new InputOption('install-suggests', null, InputOption::VALUE_NONE, 'Also install suggested packages (ignored when installing from an existing lock file).'),
)) ))
->setHelp(<<<EOT ->setHelp(<<<EOT
@ -57,7 +57,7 @@ EOT
->setDryRun($input->getOption('dry-run')) ->setDryRun($input->getOption('dry-run'))
->setVerbose($input->getOption('verbose')) ->setVerbose($input->getOption('verbose'))
->setPreferSource($input->getOption('prefer-source')) ->setPreferSource($input->getOption('prefer-source'))
->setInstallRecommends($input->getOption('install-recommends')) ->setInstallRecommends(!$input->getOption('no-install-recommends'))
->setInstallSuggests($input->getOption('install-suggests')) ->setInstallSuggests($input->getOption('install-suggests'))
; ;

@ -31,7 +31,7 @@ class UpdateCommand extends Command
->setDefinition(array( ->setDefinition(array(
new InputOption('prefer-source', null, InputOption::VALUE_NONE, 'Forces installation from package sources when possible, including VCS information.'), new InputOption('prefer-source', null, InputOption::VALUE_NONE, 'Forces installation from package sources when possible, including VCS information.'),
new InputOption('dry-run', null, InputOption::VALUE_NONE, 'Outputs the operations but will not execute anything (implicitly enables --verbose).'), new InputOption('dry-run', null, InputOption::VALUE_NONE, 'Outputs the operations but will not execute anything (implicitly enables --verbose).'),
new InputOption('install-recommends', null, InputOption::VALUE_NONE, 'Also install recommended packages.'), new InputOption('no-install-recommends', null, InputOption::VALUE_NONE, 'Do not install recommended packages.'),
new InputOption('install-suggests', null, InputOption::VALUE_NONE, 'Also install suggested packages.'), new InputOption('install-suggests', null, InputOption::VALUE_NONE, 'Also install suggested packages.'),
)) ))
->setHelp(<<<EOT ->setHelp(<<<EOT
@ -57,7 +57,7 @@ EOT
->setDryRun($input->getOption('dry-run')) ->setDryRun($input->getOption('dry-run'))
->setVerbose($input->getOption('verbose')) ->setVerbose($input->getOption('verbose'))
->setPreferSource($input->getOption('prefer-source')) ->setPreferSource($input->getOption('prefer-source'))
->setInstallRecommends($input->getOption('install-recommends')) ->setInstallRecommends(!$input->getOption('no-install-recommends'))
->setInstallSuggests($input->getOption('install-suggests')) ->setInstallSuggests($input->getOption('install-suggests'))
->setUpdate(true) ->setUpdate(true)
; ;

@ -75,12 +75,12 @@ class Installer
*/ */
protected $eventDispatcher; protected $eventDispatcher;
protected $preferSource; protected $preferSource = false;
protected $dryRun; protected $dryRun = false;
protected $verbose; protected $verbose = false;
protected $installRecommends; protected $installRecommends = true;
protected $installSuggests; protected $installSuggests = false;
protected $update; protected $update = false;
/** /**
* @var RepositoryInterface * @var RepositoryInterface
@ -358,9 +358,9 @@ class Installer
} }
/** /**
* also install recommend packages * install recommend packages
* *
* @param boolean $installRecommends * @param boolean $noInstallRecommends
* @return Installer * @return Installer
*/ */
public function setInstallRecommends($installRecommends=true) public function setInstallRecommends($installRecommends=true)

Loading…
Cancel
Save