瀏覽代碼

Avoid calling findPackage for non-platform packages

Jordi Boggiano 5 年之前
父節點
當前提交
d73cef3fb4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Command/SuggestsCommand.php

+ 1 - 1
src/Composer/Command/SuggestsCommand.php

@@ -90,7 +90,7 @@ EOT
                 continue;
             }
             foreach ($package['suggest'] as $suggestion => $reason) {
-                if (null !== $platform->findPackage($suggestion, '*')) {
+                if (preg_match(PlatformRepository::PLATFORM_PACKAGE_REGEX, $suggestion) && null !== $platform->findPackage($suggestion, '*')) {
                     continue;
                 }
                 if (!isset($installed[$suggestion])) {