$pool
$pool :
Selects the best possible version for a package
__construct(\Composer\DependencyResolver\Pool $pool)
| \Composer\DependencyResolver\Pool | $pool |
findBestCandidate(string $packageName, string $targetPackageVersion = null, string $targetPhpVersion = null, string $preferredStability = 'stable') : \Composer\Package\PackageInterface|boolean
Given a package name and optional version, returns the latest PackageInterface that matches.
| string | $packageName | |
| string | $targetPackageVersion | |
| string | $targetPhpVersion | |
| string | $preferredStability |
findRecommendedRequireVersion(\Composer\Package\PackageInterface $package) : string
Given a concrete version, this returns a ~ constraint (when possible) that should be used, for example, in composer.json.
For example:
| \Composer\Package\PackageInterface | $package |