Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PluginInstaller.php

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\Installer

Code

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);
}
RSS feed
Powered by Drupal