// get rid of #refs as those are used by composer only
if (preg_match('{^(dev-[^,\s@]+?|[^,\s@]+?\.x-dev)#.+$}i',
$constraint,
$match)) { $constraint =
$match[1
];
} if (preg_match('{^(v)?[xX*](\.[xX*])*$}i',
$constraint,
$match)) { if (!
empty($match[1
]) || !
empty($match[2
])) { return array
(new Constraint('>=', '0.0.0.0-dev'
));
} return array
(new MatchAllConstraint());
} $versionRegex = 'v?(\d++)(?:\.(\d++))?(?:\.(\d++))?(?:\.(\d++))?(?:' . self::
$modifierRegex . '|\.([xX*][.-]?dev))(?:\+[^\s]+)?';
// Tilde Range
//
// Like wildcard constraints, unsuffixed tilde constraints say that they must be greater than the previous
// version, to ensure that unstable instances of the current version are allowed. However, if a stability
// suffix is added to the constraint, then a >= match on the current version is used instead.
if (preg_match('{^~>?' .
$versionRegex . '$}i',
$constraint,
$matches)) { if (strpos($constraint, '~>'
) === 0
) {