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

Breadcrumb

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

function Factory::purgePackages

Parameters

InstalledRepositoryInterface $repo repository to purge packages from:

Installer\InstallationManager $im manager to check whether packages are still installed:

1 call to Factory::purgePackages()
Factory::createComposer in vendor/composer/composer/src/Composer/Factory.php
Creates a Composer instance

File

vendor/composer/composer/src/Composer/Factory.php, line 596

Class

Factory
Creates a configured instance of composer.

Namespace

Composer

Code

protected function purgePackages(InstalledRepositoryInterface $repo, Installer\InstallationManager $im) : void {
    foreach ($repo->getPackages() as $package) {
        if (!$im->isPackageInstalled($repo, $package)) {
            $repo->removePackage($package);
        }
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal