1
0
Fork 0

Fix parsing of stability for lowercased RC versions

pull/1060/merge
Jordi Boggiano 2012-09-04 15:59:29 +02:00
parent ecb6dcb60d
commit e01a9c564d
2 changed files with 4 additions and 3 deletions

View File

@ -41,7 +41,7 @@ class VersionParser
return 'dev';
}
preg_match('{'.self::$modifierRegex.'$}', $version, $match);
preg_match('{'.self::$modifierRegex.'$}i', strtolower($version), $match);
if (!empty($match[3])) {
return 'dev';
}
@ -53,7 +53,7 @@ class VersionParser
if ('alpha' === $match[1] || 'a' === $match[1]) {
return 'alpha';
}
if ('RC' === $match[1]) {
if ('rc' === $match[1]) {
return 'RC';
}
}

View File

@ -240,9 +240,10 @@ class VersionParserTest extends \PHPUnit_Framework_TestCase
array('stable', '3.1.2-patch'),
array('alpha', '3.1.2-alpha5'),
array('beta', '3.1.2-beta'),
array('beta', '2.0b1'),
array('beta', '2.0B1'),
array('alpha', '1.2.0a1'),
array('alpha', '1.2_a1'),
array('RC', '2.0.0rc1')
);
}
}