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

Breadcrumb

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

function Request::getPresentMap

@TODO look into removing the packageIds option, the only place true is used is for the installed map in the solver problems. Some locked packages may not be in the pool, so they have a package->id of -1

Return value

($packageIds is true ? array<int, BasePackage> : array<string, BasePackage>)

File

vendor/composer/composer/src/Composer/DependencyResolver/Request.php, line 200

Class

Request
@author Nils Adermann <naderman@naderman.de>

Namespace

Composer\DependencyResolver

Code

public function getPresentMap(bool $packageIds = false) : array {
    $presentMap = [];
    if ($this->lockedRepository !== null) {
        foreach ($this->lockedRepository
            ->getPackages() as $package) {
            $presentMap[$packageIds ? $package->getId() : spl_object_hash($package)] = $package;
        }
    }
    foreach ($this->fixedPackages as $package) {
        $presentMap[$packageIds ? $package->getId() : spl_object_hash($package)] = $package;
    }
    return $presentMap;
}

API Navigation

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