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

Breadcrumb

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

function PoolOptimizer::optimize

File

vendor/composer/composer/src/Composer/DependencyResolver/PoolOptimizer.php, line 71

Class

PoolOptimizer
Optimizes a given pool

Namespace

Composer\DependencyResolver

Code

public function optimize(Request $request, Pool $pool) : Pool {
    $this->prepare($request, $pool);
    $this->optimizeByIdenticalDependencies($request, $pool);
    $this->optimizeImpossiblePackagesAway($request, $pool);
    $optimizedPool = $this->applyRemovalsToPool($pool);
    // No need to run this recursively at the moment
    // because the current optimizations cannot provide
    // even more gains when ran again. Might change
    // in the future with additional optimizations.
    $this->irremovablePackages = [];
    $this->requireConstraintsPerPackage = [];
    $this->conflictConstraintsPerPackage = [];
    $this->packagesToRemove = [];
    $this->aliasesPerPackage = [];
    $this->removedVersionsByPackage = [];
    return $optimizedPool;
}

API Navigation

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