function RepositorySet::__construct
In most cases if you are looking to use this class as a way to find packages from repositories passing minimumStability is all you need to worry about. The rest is for advanced pool creation including aliases, pinned references and other special cases.
@phpstan-param array<string, BasePackage::STABILITY_*> $stabilityFlags
@phpstan-param list<array{package: string, version: string, alias: string, alias_normalized: string}> $rootAliases
@phpstan-param array<string, string> $rootReferences
@phpstan-param array<string, ConstraintInterface> $rootRequires
Parameters
key-of<BasePackage::STABILITIES> $minimumStability:
int[] $stabilityFlags an array of package name => BasePackage::STABILITY_* value:
array[] $rootAliases:
string[] $rootReferences an array of package name => source reference:
ConstraintInterface[] $rootRequires an array of package name => constraint from the root package:
array<string, ConstraintInterface> $temporaryConstraints Runtime temporary constraints that will be used to filter packages:
File
-
vendor/
composer/ composer/ src/ Composer/ Repository/ RepositorySet.php, line 110
Class
- RepositorySet
- @author Nils Adermann <naderman@naderman.de>
Namespace
Composer\RepositoryCode
public function __construct(string $minimumStability = 'stable', array $stabilityFlags = [], array $rootAliases = [], array $rootReferences = [], array $rootRequires = [], array $temporaryConstraints = []) {
$this->rootAliases = self::getRootAliasesPerPackage($rootAliases);
$this->rootReferences = $rootReferences;
$this->acceptableStabilities = [];
foreach (BasePackage::STABILITIES as $stability => $value) {
if ($value <= BasePackage::STABILITIES[$minimumStability]) {
$this->acceptableStabilities[$stability] = $value;
}
}
$this->stabilityFlags = $stabilityFlags;
$this->rootRequires = $rootRequires;
foreach ($rootRequires as $name => $constraint) {
if (PlatformRepository::isPlatformPackage($name)) {
unset($this->rootRequires[$name]);
}
}
$this->temporaryConstraints = $temporaryConstraints;
}