ALPHA 3.0.2a

This commit is contained in:
TheGamecraft
2018-09-10 08:51:18 -04:00
parent 7fe13ae0a7
commit 0e0ef86b71
1404 changed files with 10604 additions and 33714 deletions

View File

@@ -24,7 +24,7 @@ class VersionConstraintParser {
return $this->handleOrGroup($value);
}
if (!preg_match('/^[\^~\*]?[\d.\*]+$/', $value)) {
if (!preg_match('/^[\^~\*]?[\d.\*]+(?:-.*)?$/', $value)) {
throw new UnsupportedVersionConstraintException(
sprintf('Version constraint %s is not supported.', $value)
);
@@ -45,20 +45,20 @@ class VersionConstraintParser {
if ($version->getMinor()->isAny()) {
return new SpecificMajorVersionConstraint(
$value,
$version->getVersionString(),
$version->getMajor()->getValue()
);
}
if ($version->getPatch()->isAny()) {
return new SpecificMajorAndMinorVersionConstraint(
$value,
$version->getVersionString(),
$version->getMajor()->getValue(),
$version->getMinor()->getValue()
);
}
return new ExactVersionConstraint($value);
return new ExactVersionConstraint($version->getVersionString());
}
/**
@@ -82,7 +82,7 @@ class VersionConstraintParser {
* @return AndVersionConstraintGroup
*/
private function handleTildeOperator($value) {
$version = new Version(substr($value, 1));
$version = new Version(substr($value, 1));
$constraints = [
new GreaterThanOrEqualToVersionConstraint($value, $version)
];