public static function Semver::satisfies in Automatic Updates 7
Determine if given version satisfies given constraints.
Parameters
string $version:
string $constraints:
Return value
bool
1 call to Semver::satisfies()
- Semver::satisfiedBy in vendor/
composer/ semver/ src/ Semver.php - Return all versions that satisfy given constraints.
File
- vendor/
composer/ semver/ src/ Semver.php, line 32
Class
Namespace
Composer\SemverCode
public static function satisfies($version, $constraints) {
if (null === self::$versionParser) {
self::$versionParser = new VersionParser();
}
$versionParser = self::$versionParser;
$provider = new Constraint('==', $versionParser
->normalize($version));
$parsedConstraints = $versionParser
->parseConstraints($constraints);
return $parsedConstraints
->matches($provider);
}