function Pool::whatProvides
Searches all packages providing the given package name and match the constraint
Parameters
string $name The package name to be searched for:
?ConstraintInterface $constraint A constraint that all returned: packages must match or null to return all
Return value
BasePackage[] A set of packages
File
-
vendor/
composer/ composer/ src/ Composer/ DependencyResolver/ Pool.php, line 140
Class
- Pool
- A package pool contains all packages for dependency resolution
Namespace
Composer\DependencyResolverCode
public function whatProvides(string $name, ?ConstraintInterface $constraint = null) : array {
$key = (string) $constraint;
if (isset($this->providerCache[$name][$key])) {
return $this->providerCache[$name][$key];
}
return $this->providerCache[$name][$key] = $this->computeWhatProvides($name, $constraint);
}