Load plugins and installers prior to checking installed packages
parent
2ca07add97
commit
bf08019292
|
@ -260,6 +260,10 @@ class Factory
|
||||||
// add installers to the manager
|
// add installers to the manager
|
||||||
$this->createDefaultInstallers($im, $composer, $io);
|
$this->createDefaultInstallers($im, $composer, $io);
|
||||||
|
|
||||||
|
if (!$disablePlugins) {
|
||||||
|
$pm->loadInstalledPlugins();
|
||||||
|
}
|
||||||
|
|
||||||
// purge packages if they have been deleted on the filesystem
|
// purge packages if they have been deleted on the filesystem
|
||||||
$this->purgePackages($rm, $im);
|
$this->purgePackages($rm, $im);
|
||||||
|
|
||||||
|
@ -272,10 +276,6 @@ class Factory
|
||||||
$composer->setLocker($locker);
|
$composer->setLocker($locker);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$disablePlugins) {
|
|
||||||
$pm->loadInstalledPlugins();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $composer;
|
return $composer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,7 @@ class PluginManager
|
||||||
$generator = $this->composer->getAutoloadGenerator();
|
$generator = $this->composer->getAutoloadGenerator();
|
||||||
$autoloads = array();
|
$autoloads = array();
|
||||||
foreach ($autoloadPackages as $autoloadPackage) {
|
foreach ($autoloadPackages as $autoloadPackage) {
|
||||||
$downloadPath = $this->getInstallPath($autoloadPackage, !$localRepo->hasPackage($autoloadPackage));
|
$downloadPath = $this->getInstallPath($autoloadPackage, ($this->globalRepository && $this->globalRepository->hasPackage($autoloadPackage)));
|
||||||
$autoloads[] = array($autoloadPackage, $downloadPath);
|
$autoloads[] = array($autoloadPackage, $downloadPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,7 @@ class PluginInstallerTest extends \PHPUnit_Framework_TestCase
|
||||||
$config->merge(array(
|
$config->merge(array(
|
||||||
'config' => array(
|
'config' => array(
|
||||||
'vendor-dir' => __DIR__.'/Fixtures/',
|
'vendor-dir' => __DIR__.'/Fixtures/',
|
||||||
|
'home' => __DIR__.'/Fixtures',
|
||||||
'bin-dir' => __DIR__.'/Fixtures/bin',
|
'bin-dir' => __DIR__.'/Fixtures/bin',
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
Loading…
Reference in New Issue