function PluginInstaller::prepare
@inheritDoc
Overrides LibraryInstaller::prepare
File
-
vendor/
composer/ composer/ src/ Composer/ Installer/ PluginInstaller.php, line 54
Class
- PluginInstaller
- Installer for plugin packages
Namespace
Composer\InstallerCode
public function prepare($type, PackageInterface $package, ?PackageInterface $prevPackage = null) {
// 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, true === ($package->getExtra()['plugin-optional'] ?? false));
}
return parent::prepare($type, $package, $prevPackage);
}