Sfoglia il codice sorgente

Avoid calling findPackage for non-platform packages

Jordi Boggiano 5 anni fa
parent
commit
d73cef3fb4
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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])) {