1
0
Fork 0

Take into account a package's "provide" and "replace" fields

A package can satisfy a require by its "provide" or "replace" fields,
so this leverages the getNames() method which returns these alternate
names as well.
pull/6371/head
Stephen Beemsterboer 2017-05-23 19:17:18 -04:00
parent 6c4800b8d2
commit 4cda7e0a44
1 changed files with 2 additions and 2 deletions

View File

@ -757,7 +757,7 @@ class Installer
if ($package->getType() === 'composer-plugin' if ($package->getType() === 'composer-plugin'
|| $package->getType() === 'composer-installer' || $package->getType() === 'composer-installer'
|| in_array($package->getName(), $installerRequires) || count(array_intersect($package->getNames(), $installerRequires))
) { ) {
// capture the requirements for this package so those packages will be moved up as well // capture the requirements for this package so those packages will be moved up as well
$installerRequires = array_merge($installerRequires, array_keys($package->getRequires())); $installerRequires = array_merge($installerRequires, array_keys($package->getRequires()));