1
0
Fork 0

Fix version parsing

pull/1/head
Jordi Boggiano 2011-04-23 22:25:10 +02:00
parent d185194d1a
commit 14b3325347
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ abstract class BasePackage implements PackageInterface
*/ */
public static function parseVersion($version) public static function parseVersion($version)
{ {
if (!preg_match('#^v?(\d+)(\.\d+)?(\.\d+)?-?(?:(beta|RC\d+|alpha|dev)?\d*)$#i', $version, $matches)) { if (!preg_match('#^v?(\d+)(\.\d+)?(\.\d+)?-?((?:beta|RC\d+|alpha|dev)\d*)?$#i', $version, $matches)) {
throw new \UnexpectedValueException('Invalid version string '.$version); throw new \UnexpectedValueException('Invalid version string '.$version);
} }