Skip to content

Commit

Permalink
Allow use of --locked with depends and prohibits (composer#10834)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
fredden authored and emahorvat52 committed Jan 18, 2023
1 parent 30b053c commit a4a24a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Composer/Command/DependsCommand.php
Expand Up @@ -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(
<<<EOT
Expand Down
1 change: 1 addition & 0 deletions src/Composer/Command/ProhibitsCommand.php
Expand Up @@ -40,6 +40,7 @@ protected function configure(): void
new InputArgument(self::ARGUMENT_CONSTRAINT, InputArgument::REQUIRED, 'Version constraint, which version you expected to be installed'),
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(
<<<EOT
Expand Down

0 comments on commit a4a24a6

Please sign in to comment.