Add ignore-platform-reqs option to require command

main
Olivier Laurendeau 10 years ago
parent 6784570691
commit b6b3cf3a49

@ -44,6 +44,7 @@ class RequireCommand extends InitCommand
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-no-dev', null, InputOption::VALUE_NONE, 'Run the dependency update with the --no-dev option.'), new InputOption('update-no-dev', null, InputOption::VALUE_NONE, 'Run the dependency update with the --no-dev option.'),
new InputOption('update-with-dependencies', null, InputOption::VALUE_NONE, 'Allows inherited dependencies to be updated with explicit dependencies.'), new InputOption('update-with-dependencies', null, InputOption::VALUE_NONE, 'Allows inherited dependencies to be updated with explicit dependencies.'),
new InputOption('ignore-platform-reqs', null, InputOption::VALUE_NONE, 'Ignore platform requirements (php & ext- packages).'),
)) ))
->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
@ -131,6 +132,7 @@ EOT
->setUpdate(true) ->setUpdate(true)
->setUpdateWhitelist(array_keys($requirements)) ->setUpdateWhitelist(array_keys($requirements))
->setWhitelistDependencies($input->getOption('update-with-dependencies')) ->setWhitelistDependencies($input->getOption('update-with-dependencies'))
->setIgnorePlatformRequirements($input->getOption('ignore-platform-reqs'))
; ;
$status = $install->run(); $status = $install->run();

Loading…
Cancel
Save