Fix typo
parent
e770cb4dcf
commit
769ce48289
|
@ -248,9 +248,9 @@ class Transaction
|
||||||
*/
|
*/
|
||||||
private function movePluginsToFront(array $operations)
|
private function movePluginsToFront(array $operations)
|
||||||
{
|
{
|
||||||
$dlModyingPluginsNoDeps = array();
|
$dlModifyingPluginsNoDeps = array();
|
||||||
$dlModyingPluginsWithDeps = array();
|
$dlModifyingPluginsWithDeps = array();
|
||||||
$dlModyingPluginRequires = array();
|
$dlModifyingPluginRequires = array();
|
||||||
$pluginsNoDeps = array();
|
$pluginsNoDeps = array();
|
||||||
$pluginsWithDeps = array();
|
$pluginsWithDeps = array();
|
||||||
$pluginRequires = array();
|
$pluginRequires = array();
|
||||||
|
@ -267,7 +267,7 @@ class Transaction
|
||||||
$isDownloadsModifyingPlugin = $package->getType() === 'composer-plugin' && ($extra = $package->getExtra()) && isset($extra['plugin-modifies-downloads']) && $extra['plugin-modifies-downloads'] === true;
|
$isDownloadsModifyingPlugin = $package->getType() === 'composer-plugin' && ($extra = $package->getExtra()) && isset($extra['plugin-modifies-downloads']) && $extra['plugin-modifies-downloads'] === true;
|
||||||
|
|
||||||
// is this a downloads modifying plugin or a dependency of one?
|
// is this a downloads modifying plugin or a dependency of one?
|
||||||
if ($isDownloadsModifyingPlugin || count(array_intersect($package->getNames(), $dlModyingPluginRequires))) {
|
if ($isDownloadsModifyingPlugin || count(array_intersect($package->getNames(), $dlModifyingPluginRequires))) {
|
||||||
// get the package's requires, but filter out any platform requirements
|
// get the package's requires, but filter out any platform requirements
|
||||||
$requires = array_filter(array_keys($package->getRequires()), function ($req) {
|
$requires = array_filter(array_keys($package->getRequires()), function ($req) {
|
||||||
return !PlatformRepository::isPlatformPackage($req);
|
return !PlatformRepository::isPlatformPackage($req);
|
||||||
|
@ -276,12 +276,12 @@ class Transaction
|
||||||
// is this a plugin with no meaningful dependencies?
|
// is this a plugin with no meaningful dependencies?
|
||||||
if ($isDownloadsModifyingPlugin && !count($requires)) {
|
if ($isDownloadsModifyingPlugin && !count($requires)) {
|
||||||
// plugins with no dependencies go to the very front
|
// plugins with no dependencies go to the very front
|
||||||
array_unshift($dlModyingPluginsNoDeps, $op);
|
array_unshift($dlModifyingPluginsNoDeps, $op);
|
||||||
} else {
|
} else {
|
||||||
// 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
|
||||||
$dlModyingPluginRequires = array_merge($dlModyingPluginRequires, $requires);
|
$dlModifyingPluginRequires = array_merge($dlModifyingPluginRequires, $requires);
|
||||||
// move the operation to the front
|
// move the operation to the front
|
||||||
array_unshift($dlModyingPluginsWithDeps, $op);
|
array_unshift($dlModifyingPluginsWithDeps, $op);
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($operations[$idx]);
|
unset($operations[$idx]);
|
||||||
|
@ -313,7 +313,7 @@ class Transaction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return array_merge($dlModyingPluginsNoDeps, $dlModyingPluginsWithDeps, $pluginsNoDeps, $pluginsWithDeps, $operations);
|
return array_merge($dlModifyingPluginsNoDeps, $dlModifyingPluginsWithDeps, $pluginsNoDeps, $pluginsWithDeps, $operations);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue