From 1f97ffdcd700df530376f7a5e013c9a78ee0d93b Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 28 Jan 2019 17:54:32 +0100 Subject: [PATCH] Add some docs --- src/Composer/Installer.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index b4885e76c..f38086611 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -1322,10 +1322,13 @@ class Installer $matchesByPattern = array(); // check if the name is a glob pattern that did not match directly if (empty($depPackages)) { + // add any installed package matching the whitelisted name/pattern $whitelistPatternSearchRegexp = BasePackage::packageNameToRegexp($packageName, '^%s$'); foreach ($localOrLockRepo->search($whitelistPatternSearchRegexp) as $installedPackage) { $matchesByPattern[] = $pool->whatProvides($installedPackage['name']); } + + // add root requirements which match the whitelisted name/pattern $whitelistPatternRegexp = BasePackage::packageNameToRegexp($packageName); foreach ($rootRequiredPackageNames as $rootRequiredPackageName) { if (preg_match($whitelistPatternRegexp, $rootRequiredPackageName)) {