/**
  * Get the link constraint of normalized version.
  *
  * @param string        $normalizedVersion The normalized version
  * @param VersionParser $versionParser     The version parser
  *
  * @return ConstraintInterface The constraint
  */
 public static function getVersionConstraint($normalizedVersion, VersionParser $versionParser)
 {
     if (preg_match('/^\\d+(\\.\\d+)(\\.\\d+)(\\.\\d+)\\-[A-Za-z0-9]+$/', $normalizedVersion)) {
         $normalizedVersion = substr($normalizedVersion, 0, strpos($normalizedVersion, '-'));
     }
     return $versionParser->parseConstraints($normalizedVersion);
 }
 /**
  * Check if the require dependency has a satisfactory version.
  *
  * @param Link   $require           The require link defined in root package
  * @param string $normalizedVersion The normalized version
  *
  * @return bool
  */
 protected function satisfyVersion(Link $require, $normalizedVersion)
 {
     $constraintSame = $this->versionParser->parseConstraints($normalizedVersion);
     $sameVersion = (bool) $require->getConstraint()->matches($constraintSame);
     $normalizedVersion = FilterUtil::getVersionConstraint($normalizedVersion, $this->versionParser);
     $constraint = FilterUtil::getVersionConstraint($normalizedVersion, $this->versionParser);
     return (bool) $require->getConstraint()->matches($constraint) || $sameVersion;
 }