Avoid checking for allowed plugins if plugins are disabled entirely, fixes #10925
parent
2759d8b545
commit
dcd7f2180d
|
@ -52,8 +52,8 @@ class PluginInstaller extends LibraryInstaller
|
||||||
*/
|
*/
|
||||||
public function prepare($type, PackageInterface $package, PackageInterface $prevPackage = null)
|
public function prepare($type, PackageInterface $package, PackageInterface $prevPackage = null)
|
||||||
{
|
{
|
||||||
// fail install process early if it going to fail due to a plugin not being allowed
|
// fail install process early if it is going to fail due to a plugin not being allowed
|
||||||
if ($type === 'install' || $type === 'update') {
|
if (($type === 'install' || $type === 'update') && !$this->composer->getPluginManager()->arePluginsDisabled()) {
|
||||||
$this->composer->getPluginManager()->isPluginAllowed($package->getName(), false);
|
$this->composer->getPluginManager()->isPluginAllowed($package->getName(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -678,6 +678,16 @@ class PluginManager
|
||||||
return $rules;
|
return $rules;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function arePluginsDisabled()
|
||||||
|
{
|
||||||
|
return $this->disablePlugins;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue