From 14b3325347f03f44c48ad4c09705e087b281e0e8 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 23 Apr 2011 22:25:10 +0200 Subject: [PATCH] Fix version parsing --- src/Composer/Package/BasePackage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Package/BasePackage.php b/src/Composer/Package/BasePackage.php index ea58b5f2a..2e8b2ca3b 100644 --- a/src/Composer/Package/BasePackage.php +++ b/src/Composer/Package/BasePackage.php @@ -130,7 +130,7 @@ abstract class BasePackage implements PackageInterface */ 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); }