Expand description
Port of Composer\Package\Version\VersionSelector
(docs/reference/VersionSelector.php): the best candidate for a name
(preferred stability, then descending version, filtered by platform
requirements) and the recommended constraint for require (^x.y,
@stability, branch alias).
Collecting the candidates (RepositorySet::findPackages) is left to the
caller: find_best_candidate receives already loaded indices.
Structs§
- Warning
- A
Cannot use ...warning;verbosemeansIOInterface::VERBOSE(a repeat for the same package/target pair, hidden in normal mode).
Functions§
- find_
best_ candidate findBestCandidateon already found candidates: sort by preferred stability then version, platform filter, a9999999-devalias returned as its base package. Warnings are returned in order.- find_
recommended_ require_ version findRecommendedRequireVersion;php_versionis the local PHP’sPHP_MAJOR.MINOR.RELEASE(for theext-*rule).- platform_
constraints $this->platformConstraints: name ->[Constraint('==', version)]of thePlatformRepositorypackages.