Browse Source

add allowing require to update dep chain, fixes composer/composer#2668

Steve Buzonas 11 years ago
parent
commit
3ad47b5d2c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/Composer/Command/RequireCommand.php

+ 3 - 1
src/Composer/Command/RequireCommand.php

@@ -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('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('update-with-dependencies', null, InputOption::VALUE_NONE, 'Allows inherited dependencies to be updated with explicit dependencies.'),
             ))
             ->setHelp(<<<EOT
 The require command adds required packages to your composer.json and installs them
@@ -120,7 +121,8 @@ EOT
             ->setPreferDist($input->getOption('prefer-dist'))
             ->setDevMode(true)
             ->setUpdate(true)
-            ->setUpdateWhitelist(array_keys($requirements));
+            ->setUpdateWhitelist(array_keys($requirements))
+            ->setWhitelistDependencies($input->getOption('update-with-dependencies'));
         ;
 
         $status = $install->run();