Skip to content

Commit

Permalink
Added optional plugin check in PluginInstaller (#11318)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon committed Feb 10, 2023
1 parent 0dd5811 commit b781031
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Composer/Installer/PluginInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function prepare($type, PackageInterface $package, ?PackageInterface $pre
{
// 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);
Expand Down

0 comments on commit b781031

Please sign in to comment.