From 4fbf15e6d6e430c6d7ce4e1bd5314d38cd83ffff Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 9 Jan 2016 18:16:50 +0000 Subject: [PATCH] Tweaks and add new args to docs, refs #4663 --- doc/03-cli.md | 3 +++ src/Composer/Command/DependsCommand.php | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/03-cli.md b/doc/03-cli.md index b5f066c62..b421d7909 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -342,6 +342,9 @@ symfony/symfony requires monolog/monolog (~1) * **--link-type:** The link types to match on, can be specified multiple times. +* **--match-constraint (-m):** Filters the dependencies shown using this constraint. +* **--invert-match-constraint (-i):** Turns --match-constraint around into a blacklist + insteead of a whitelist. ## validate diff --git a/src/Composer/Command/DependsCommand.php b/src/Composer/Command/DependsCommand.php index 74c3360c1..7a37e1058 100644 --- a/src/Composer/Command/DependsCommand.php +++ b/src/Composer/Command/DependsCommand.php @@ -45,8 +45,8 @@ class DependsCommand extends Command ->setDefinition(array( new InputArgument('package', InputArgument::REQUIRED, 'Package to inspect'), new InputOption('link-type', '', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Link types to show (require, require-dev)', array_keys($this->linkTypes)), - new InputOption('match-constraint', '', InputOption::VALUE_REQUIRED, 'Constraint to match', '*'), - new InputOption('match-constraint-invert', '', InputOption::VALUE_NONE, 'If constraint match should be inverted'), + new InputOption('match-constraint', 'm', InputOption::VALUE_REQUIRED, 'Filters the dependencies shown using this constraint', '*'), + new InputOption('invert-match-constraint', 'i', InputOption::VALUE_NONE, 'Turns --match-constraint around into a blacklist insteead of whitelist'), )) ->setHelp(<<parseConstraints($input->getOption('match-constraint')); - $matchInvert = $input->getOption('match-constraint-invert'); + $matchInvert = $input->getOption('invert-match-constraint'); $messages = array(); $outputPackages = array();