From c42bb68affcce43c453076752abe32293bd18244 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 4 Mar 2024 14:07:27 +0100 Subject: [PATCH] Optimize outdated --ignore to avoid fetching the latest package info for ignored packages, fixes #11863 --- src/Composer/Command/ShowCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index 542482554..92a6e621b 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -478,7 +478,7 @@ EOT if ($showLatest && $showVersion) { foreach ($packages[$type] as $package) { - if (is_object($package)) { + if (is_object($package) && !Preg::isMatch($ignoredPackagesRegex, $package->getPrettyName())) { $latestPackage = $this->findLatestPackage($package, $composer, $platformRepo, $showMajorOnly, $showMinorOnly, $showPatchOnly, $platformReqFilter); if ($latestPackage === null) { continue;