1
0
Fork 0

Add --lock argument to the update command to make this hack explicit and official

pull/1950/merge
Jordi Boggiano 2013-05-30 10:08:34 +02:00
parent 5d360ab43b
commit f6b7f0e29a
2 changed files with 4 additions and 1 deletions

View File

@ -124,6 +124,8 @@ You can also use wildcards to update a bunch of packages at once:
* **--optimize-autoloader (-o):** Convert PSR-0 autoloading to classmap to get a faster
autoloader. This is recommended especially for production, but can take
a bit of time to run so it is currently not done by default.
* **--lock:** Only updates the lock file hash to suppress warning about the
lock file being out of date
## require

View File

@ -35,6 +35,7 @@ class UpdateCommand extends Command
new InputOption('dry-run', null, InputOption::VALUE_NONE, 'Outputs the operations but will not execute anything (implicitly enables --verbose).'),
new InputOption('dev', null, InputOption::VALUE_NONE, 'Enables installation of require-dev packages (enabled by default, only present for sanity).'),
new InputOption('no-dev', null, InputOption::VALUE_NONE, 'Disables installation of require-dev packages.'),
new InputOption('lock', null, InputOption::VALUE_NONE, 'Only updates the lock file hash to suppress warning about the lock file being out of date.'),
new InputOption('no-custom-installers', null, InputOption::VALUE_NONE, 'Disables all custom installers.'),
new InputOption('no-scripts', null, InputOption::VALUE_NONE, 'Skips the execution of all scripts defined in composer.json file.'),
new InputOption('no-progress', null, InputOption::VALUE_NONE, 'Do not output download progress.'),
@ -92,7 +93,7 @@ EOT
->setRunScripts(!$input->getOption('no-scripts'))
->setOptimizeAutoloader($input->getOption('optimize-autoloader'))
->setUpdate(true)
->setUpdateWhitelist($input->getArgument('packages'))
->setUpdateWhitelist($input->getOption('lock') ? array('lock') : $input->getArgument('packages'))
;
if ($input->getOption('no-custom-installers')) {