From 20e89a76210accf20f3574553796bd4c059a4bb9 Mon Sep 17 00:00:00 2001 From: mohsen shafiei Date: Mon, 11 Jun 2018 01:09:52 +0430 Subject: [PATCH] composer show options -t and -l do not work together, fixes #7210 --- src/Composer/Command/ShowCommand.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index 168b0f285..3f419c3d3 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -118,6 +118,12 @@ EOT return 1; } + if ($input->getOption('tree') && $input->getOption('latest')) { + $io->writeError('The --tree (-t) option is not usable in combination with --latest (-l)'); + + return 1; + } + $format = $input->getOption('format'); if (!in_array($format, array('text', 'json'))) { $io->writeError(sprintf('Unsupported format "%s". See help for supported formats.', $format));