From a4a24a6358175305d96be5d630626d8eba5346a1 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Sat, 25 Jun 2022 16:06:58 +0100 Subject: [PATCH] Allow use of --locked with depends and prohibits (#10834) * Allow use of --locked with depends and prohibits * Only include other repos if not --locked * Move logic to appease PHPStan * Load a PlatformRepository when reading lock file --- src/Composer/Command/DependsCommand.php | 1 + src/Composer/Command/ProhibitsCommand.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Composer/Command/DependsCommand.php b/src/Composer/Command/DependsCommand.php index 1b353807aad4..de912add93c4 100644 --- a/src/Composer/Command/DependsCommand.php +++ b/src/Composer/Command/DependsCommand.php @@ -39,6 +39,7 @@ protected function configure(): void new InputArgument(self::ARGUMENT_PACKAGE, InputArgument::REQUIRED, 'Package to inspect', null, $this->suggestInstalledPackage(true)), new InputOption(self::OPTION_RECURSIVE, 'r', InputOption::VALUE_NONE, 'Recursively resolves up to the root package'), new InputOption(self::OPTION_TREE, 't', InputOption::VALUE_NONE, 'Prints the results as a nested tree'), + new InputOption('locked', null, InputOption::VALUE_NONE, 'Read dependency information from composer.lock'), )) ->setHelp( <<setHelp( <<