/**
* Determine if given version satisfies given constraints.
*
* @param string $version
* @param string $constraints
*
* @return bool
*/
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);
} /**
* Return all versions that satisfy given constraints.
*
* @param string[] $versions
* @param string $constraints
*
* @return string[]
*/