diff --git a/src/Composer/Installer/PluginInstaller.php b/src/Composer/Installer/PluginInstaller.php index fc9c6dcbb..04fd446a7 100644 --- a/src/Composer/Installer/PluginInstaller.php +++ b/src/Composer/Installer/PluginInstaller.php @@ -48,8 +48,8 @@ class PluginInstaller extends LibraryInstaller */ 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 - if ($type === 'install' || $type === 'update') { + // fail install process early if it is going to fail due to a plugin not being allowed + if (($type === 'install' || $type === 'update') && !$this->getPluginManager()->arePluginsDisabled()) { $this->getPluginManager()->isPluginAllowed($package->getName(), false); } diff --git a/src/Composer/Plugin/PluginManager.php b/src/Composer/Plugin/PluginManager.php index 2ca137012..9efefe7bd 100644 --- a/src/Composer/Plugin/PluginManager.php +++ b/src/Composer/Plugin/PluginManager.php @@ -673,6 +673,16 @@ class PluginManager return $rules; } + /** + * @internal + * + * @return bool + */ + public function arePluginsDisabled() + { + return $this->disablePlugins; + } + /** * @internal *