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

Breadcrumb

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

function RepositoryInterface::loadPackages

Returns list of registered packages with the supplied name

  • The packages returned are the packages found which match the constraints, acceptable stability and stability flags provided
  • The namesFound returned are names which should be considered as canonically found in this repository, that should not be looked up in any further lower priority repositories

@phpstan-param array<key-of<BasePackage::STABILITIES>, BasePackage::STABILITY_*> $acceptableStabilities @phpstan-param array<string, ConstraintInterface|null> $packageNameMap @phpstan-return array{namesFound: array<string>, packages: array<BasePackage>}

Parameters

ConstraintInterface[] $packageNameMap package names pointing to constraints:

array<string, int> $acceptableStabilities array of stability => BasePackage::STABILITY_* value:

array<string, BasePackage::STABILITY_*> $stabilityFlags an array of package name => BasePackage::STABILITY_* value:

array<string, array<string, PackageInterface>> $alreadyLoaded an array of package name => package version => package:

Return value

array

3 methods override RepositoryInterface::loadPackages()
ArrayRepository::loadPackages in vendor/composer/composer/src/Composer/Repository/ArrayRepository.php
@inheritDoc
CompositeRepository::loadPackages in vendor/composer/composer/src/Composer/Repository/CompositeRepository.php
@inheritDoc
FilterRepository::loadPackages in vendor/composer/composer/src/Composer/Repository/FilterRepository.php
@inheritDoc

File

vendor/composer/composer/src/Composer/Repository/RepositoryInterface.php, line 85

Class

RepositoryInterface
Repository interface.

Namespace

Composer\Repository

Code

public function loadPackages(array $packageNameMap, array $acceptableStabilities, array $stabilityFlags, array $alreadyLoaded = []);

API Navigation

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