add allowing require to update dep chain, fixes composer/composer#2668
parent
7343198817
commit
3ad47b5d2c
|
@ -42,6 +42,7 @@ class RequireCommand extends InitCommand
|
||||||
new InputOption('prefer-dist', null, InputOption::VALUE_NONE, 'Forces installation from package dist even for dev versions.'),
|
new InputOption('prefer-dist', null, InputOption::VALUE_NONE, 'Forces installation from package dist even for dev versions.'),
|
||||||
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.'),
|
||||||
new InputOption('no-update', null, InputOption::VALUE_NONE, 'Disables the automatic update of the dependencies.'),
|
new InputOption('no-update', null, InputOption::VALUE_NONE, 'Disables the automatic update of the dependencies.'),
|
||||||
|
new InputOption('update-with-dependencies', null, InputOption::VALUE_NONE, 'Allows inherited dependencies to be updated with explicit dependencies.'),
|
||||||
))
|
))
|
||||||
->setHelp(<<<EOT
|
->setHelp(<<<EOT
|
||||||
The require command adds required packages to your composer.json and installs them
|
The require command adds required packages to your composer.json and installs them
|
||||||
|
@ -120,7 +121,8 @@ EOT
|
||||||
->setPreferDist($input->getOption('prefer-dist'))
|
->setPreferDist($input->getOption('prefer-dist'))
|
||||||
->setDevMode(true)
|
->setDevMode(true)
|
||||||
->setUpdate(true)
|
->setUpdate(true)
|
||||||
->setUpdateWhitelist(array_keys($requirements));
|
->setUpdateWhitelist(array_keys($requirements))
|
||||||
|
->setWhitelistDependencies($input->getOption('update-with-dependencies'));
|
||||||
;
|
;
|
||||||
|
|
||||||
$status = $install->run();
|
$status = $install->run();
|
||||||
|
|
Loading…
Reference in New Issue