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

Breadcrumb

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

function PluginManager::deactivateRepository

Deactivate all plugins and installers from a repository

If a plugin requires another plugin, the required one will be deactivated last

Parameters

RepositoryInterface $repo Repository to scan for plugins to install:

1 call to PluginManager::deactivateRepository()
PluginManager::deactivateInstalledPlugins in vendor/composer/composer/src/Composer/Plugin/PluginManager.php
Deactivate all plugins from currently installed plugin packages

File

vendor/composer/composer/src/Composer/Plugin/PluginManager.php, line 507

Class

PluginManager
Plugin manager

Namespace

Composer\Plugin

Code

private function deactivateRepository(RepositoryInterface $repo, bool $isGlobalRepo) : void {
    $packages = $repo->getPackages();
    $sortedPackages = array_reverse(PackageSorter::sortPackages($packages));
    foreach ($sortedPackages as $package) {
        if (!$package instanceof CompletePackage) {
            continue;
        }
        if ('composer-plugin' === $package->getType()) {
            $this->deactivatePackage($package);
            // Backward compatibility
        }
        elseif ('composer-installer' === $package->getType()) {
            $this->deactivatePackage($package);
        }
    }
}
RSS feed
Powered by Drupal