From e90be2d9b9008b70dbe3926785fc0f713332a974 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 23 Jun 2022 21:16:12 +0200 Subject: [PATCH] Add hint to why-not that calling update with a temporary constraint can also help elucidate an issue --- src/Composer/Command/BaseDependencyCommand.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Composer/Command/BaseDependencyCommand.php b/src/Composer/Command/BaseDependencyCommand.php index 5c7f6ec7f3ac..7519fa8862a3 100644 --- a/src/Composer/Command/BaseDependencyCommand.php +++ b/src/Composer/Command/BaseDependencyCommand.php @@ -127,6 +127,10 @@ protected function doExecute(InputInterface $input, OutputInterface $output, boo $this->printTable($output, $results); } + if ($inverted) { + $this->getIO()->writeError('Not finding what you were looking for? Try calling `composer update "'.$input->getArgument(self::ARGUMENT_PACKAGE).':'.$input->getArgument(self::ARGUMENT_CONSTRAINT).'" --dry-run` to get another view on the problem.'); + } + return 0; }