1
0
Fork 0

Always make the root package autoloadable when executing plugins, fixes #9530

pull/9615/head
Jordi Boggiano 2021-01-13 11:45:00 +01:00
parent 147d884996
commit de58c5499e
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 4 additions and 4 deletions

View File

@ -186,13 +186,13 @@ class PluginManager
$autoloadPackages = $this->collectDependencies($installedRepo, $autoloadPackages, $package); $autoloadPackages = $this->collectDependencies($installedRepo, $autoloadPackages, $package);
$generator = $this->composer->getAutoloadGenerator(); $generator = $this->composer->getAutoloadGenerator();
$autoloads = array(); $autoloads = array(array($rootPackage, ''));
foreach ($autoloadPackages as $autoloadPackage) { foreach ($autoloadPackages as $autoloadPackage) {
if ($autoloadPackage === $rootPackage) { if ($autoloadPackage === $rootPackage) {
$downloadPath = ''; continue;
} else {
$downloadPath = $this->getInstallPath($autoloadPackage, $globalRepo && $globalRepo->hasPackage($autoloadPackage));
} }
$downloadPath = $this->getInstallPath($autoloadPackage, $globalRepo && $globalRepo->hasPackage($autoloadPackage));
$autoloads[] = array($autoloadPackage, $downloadPath); $autoloads[] = array($autoloadPackage, $downloadPath);
} }