From b7810314130bce6ffdaf5c9f26e50224a18d2b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Fri, 10 Feb 2023 21:12:30 +0100 Subject: [PATCH] Added optional plugin check in PluginInstaller (#11318) --- src/Composer/Installer/PluginInstaller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Installer/PluginInstaller.php b/src/Composer/Installer/PluginInstaller.php index 68326462e..bae1d938b 100644 --- a/src/Composer/Installer/PluginInstaller.php +++ b/src/Composer/Installer/PluginInstaller.php @@ -50,7 +50,7 @@ class PluginInstaller extends LibraryInstaller { // 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('local')) { - $this->getPluginManager()->isPluginAllowed($package->getName(), false); + $this->getPluginManager()->isPluginAllowed($package->getName(), false, $package->getExtra()['plugin-optional'] ?? false); } return parent::prepare($type, $package, $prevPackage);