diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index 0fc8185b8..db26fdfed 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -190,10 +190,6 @@ class Installer foreach ($this->suggestedPackages as $suggestion) { $target = $suggestion['target']; if ($installedRepo->filterPackages(function (PackageInterface $package) use ($target) { - // check the name first as it is the common case - if ($package->getName() === $target) { - return false; - } if (in_array($target, $package->getNames())) { return false; } diff --git a/tests/Composer/Test/Fixtures/installer/suggest-installed.test b/tests/Composer/Test/Fixtures/installer/suggest-installed.test index b84f0a252..f46102d0a 100644 --- a/tests/Composer/Test/Fixtures/installer/suggest-installed.test +++ b/tests/Composer/Test/Fixtures/installer/suggest-installed.test @@ -1,5 +1,5 @@ --TEST-- -Suggestions are not displayed for installed packages if they are also installed +Suggestions are not displayed for installed packages --COMPOSER-- { "repositories": [ diff --git a/tests/Composer/Test/Fixtures/installer/suggest-replaced.test b/tests/Composer/Test/Fixtures/installer/suggest-replaced.test index 3691e6070..d1e8f6102 100644 --- a/tests/Composer/Test/Fixtures/installer/suggest-replaced.test +++ b/tests/Composer/Test/Fixtures/installer/suggest-replaced.test @@ -1,5 +1,5 @@ --TEST-- -Suggestions are not displayed for installed packages if they are replaced +Suggestions are not displayed for packages if they are replaced --COMPOSER-- { "repositories": [ diff --git a/tests/Composer/Test/Fixtures/installer/suggest-uninstalled.test b/tests/Composer/Test/Fixtures/installer/suggest-uninstalled.test index a4ad14fd7..d2ea37766 100644 --- a/tests/Composer/Test/Fixtures/installer/suggest-uninstalled.test +++ b/tests/Composer/Test/Fixtures/installer/suggest-uninstalled.test @@ -1,5 +1,5 @@ --TEST-- -Suggestions are displayed for installed packages +Suggestions are displayed --COMPOSER-- { "repositories": [