Laravel 5.6 updates
Travis config update Removed HHVM script as Laravel no longer support HHVM after releasing 5.3
This commit is contained in:
59
vendor/phar-io/version/src/Version.php
vendored
59
vendor/phar-io/version/src/Version.php
vendored
@@ -45,26 +45,10 @@ class Version {
|
||||
$this->versionString = $versionString;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $matches
|
||||
*/
|
||||
private function parseVersion(array $matches) {
|
||||
$this->major = new VersionNumber($matches['Major']);
|
||||
$this->minor = new VersionNumber($matches['Minor']);
|
||||
$this->patch = isset($matches['Patch']) ? new VersionNumber($matches['Patch']) : new VersionNumber(null);
|
||||
|
||||
if (isset($matches['ReleaseType'])) {
|
||||
$preReleaseNumber = isset($matches['ReleaseTypeCount']) ? (int) $matches['ReleaseTypeCount'] : null;
|
||||
|
||||
$this->preReleaseSuffix = new PreReleaseSuffix($matches['ReleaseType'], $preReleaseNumber);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PreReleaseSuffix
|
||||
*/
|
||||
public function getPreReleaseSuffix()
|
||||
{
|
||||
public function getPreReleaseSuffix() {
|
||||
return $this->preReleaseSuffix;
|
||||
}
|
||||
|
||||
@@ -75,6 +59,13 @@ class Version {
|
||||
return $this->versionString;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasPreReleaseSuffix() {
|
||||
return $this->preReleaseSuffix !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Version $version
|
||||
*
|
||||
@@ -97,7 +88,7 @@ class Version {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($version->getPatch()->getValue() >= $this->getPatch()->getValue()) {
|
||||
if ($version->getPatch()->getValue() > $this->getPatch()->getValue()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -105,7 +96,19 @@ class Version {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
if (!$version->hasPreReleaseSuffix() && !$this->hasPreReleaseSuffix()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($version->hasPreReleaseSuffix() && !$this->hasPreReleaseSuffix()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!$version->hasPreReleaseSuffix() && $this->hasPreReleaseSuffix()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->getPreReleaseSuffix()->isGreaterThan($version->getPreReleaseSuffix());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -129,6 +132,19 @@ class Version {
|
||||
return $this->patch;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $matches
|
||||
*/
|
||||
private function parseVersion(array $matches) {
|
||||
$this->major = new VersionNumber($matches['Major']);
|
||||
$this->minor = new VersionNumber($matches['Minor']);
|
||||
$this->patch = isset($matches['Patch']) ? new VersionNumber($matches['Patch']) : new VersionNumber(null);
|
||||
|
||||
if (isset($matches['PreReleaseSuffix'])) {
|
||||
$this->preReleaseSuffix = new PreReleaseSuffix($matches['PreReleaseSuffix']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $version
|
||||
*
|
||||
@@ -144,10 +160,7 @@ class Version {
|
||||
)?
|
||||
(?:
|
||||
-
|
||||
(?<ReleaseType>(?:(dev|beta|b|RC|alpha|a|patch|p)))
|
||||
(?:
|
||||
(?<ReleaseTypeCount>[0-9])
|
||||
)?
|
||||
(?<PreReleaseSuffix>(?:(dev|beta|b|RC|alpha|a|patch|p)\.?\d*))
|
||||
)?
|
||||
$/x';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user