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\RepositoryCode
public function loadPackages(array $packageNameMap, array $acceptableStabilities, array $stabilityFlags, array $alreadyLoaded = []);