Avoid relying on internal usort behavior
parent
c917865fe9
commit
ef7252b358
|
@ -70,6 +70,10 @@ class VersionParser extends SemverVersionParser
|
||||||
*/
|
*/
|
||||||
public static function isUpgrade($normalizedFrom, $normalizedTo)
|
public static function isUpgrade($normalizedFrom, $normalizedTo)
|
||||||
{
|
{
|
||||||
|
if (substr($normalizedFrom, 0, 4) === 'dev-' || substr($normalizedTo, 0, 4) === 'dev-') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
$sorted = Semver::sort(array($normalizedTo, $normalizedFrom));
|
$sorted = Semver::sort(array($normalizedTo, $normalizedFrom));
|
||||||
|
|
||||||
return $sorted[0] === $normalizedFrom;
|
return $sorted[0] === $normalizedFrom;
|
||||||
|
|
Loading…
Reference in New Issue