From ddecd5e328c2643103e659c4aaa68904ed3d894a 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 6361c7e28..493e4adda 100644 --- a/src/Composer/Command/BaseDependencyCommand.php +++ b/src/Composer/Command/BaseDependencyCommand.php @@ -127,6 +127,10 @@ abstract class BaseDependencyCommand extends BaseCommand $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; }