1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Remove recommend, make suggest informational, add require-dev, fixes #78, fixes #510

This commit is contained in:
Jordi Boggiano 2012-04-14 11:55:57 +02:00
parent a46296e938
commit 53191eb0fe
10 changed files with 65 additions and 101 deletions

View file

@ -32,8 +32,7 @@ class InstallCommand extends Command
->setDefinition(array(
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('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('dev', null, InputOption::VALUE_NONE, 'Enables installation of dev-require packages.'),
))
->setHelp(<<<EOT
The <info>install</info> command reads the composer.json file from the
@ -57,8 +56,7 @@ EOT
->setDryRun($input->getOption('dry-run'))
->setVerbose($input->getOption('verbose'))
->setPreferSource($input->getOption('prefer-source'))
->setInstallRecommends(!$input->getOption('no-install-recommends'))
->setInstallSuggests($input->getOption('install-suggests'))
->setDevMode($input->getOption('dev'))
;
return $install->run() ? 0 : 1;

View file

@ -30,8 +30,7 @@ class UpdateCommand extends Command
->setDefinition(array(
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('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('dev', null, InputOption::VALUE_NONE, 'Enables installation of dev-require packages.'),
))
->setHelp(<<<EOT
The <info>update</info> command reads the composer.json file from the
@ -55,11 +54,10 @@ EOT
->setDryRun($input->getOption('dry-run'))
->setVerbose($input->getOption('verbose'))
->setPreferSource($input->getOption('prefer-source'))
->setInstallRecommends(!$input->getOption('no-install-recommends'))
->setInstallSuggests($input->getOption('install-suggests'))
->setDevMode($input->getOption('dev'))
->setUpdate(true)
;
return $install->run();
return $install->run() ? 0 : 1;
}
}