Add --lock argument to the update command to make this hack explicit and official
parent
5d360ab43b
commit
f6b7f0e29a
|
@ -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
|
* **--optimize-autoloader (-o):** Convert PSR-0 autoloading to classmap to get a faster
|
||||||
autoloader. This is recommended especially for production, but can take
|
autoloader. This is recommended especially for production, but can take
|
||||||
a bit of time to run so it is currently not done by default.
|
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
|
## require
|
||||||
|
|
||||||
|
|
|
@ -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('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('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('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-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-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.'),
|
new InputOption('no-progress', null, InputOption::VALUE_NONE, 'Do not output download progress.'),
|
||||||
|
@ -92,7 +93,7 @@ EOT
|
||||||
->setRunScripts(!$input->getOption('no-scripts'))
|
->setRunScripts(!$input->getOption('no-scripts'))
|
||||||
->setOptimizeAutoloader($input->getOption('optimize-autoloader'))
|
->setOptimizeAutoloader($input->getOption('optimize-autoloader'))
|
||||||
->setUpdate(true)
|
->setUpdate(true)
|
||||||
->setUpdateWhitelist($input->getArgument('packages'))
|
->setUpdateWhitelist($input->getOption('lock') ? array('lock') : $input->getArgument('packages'))
|
||||||
;
|
;
|
||||||
|
|
||||||
if ($input->getOption('no-custom-installers')) {
|
if ($input->getOption('no-custom-installers')) {
|
||||||
|
|
Loading…
Reference in New Issue