From c225b4c689b7c0d92d6bb24886eee24198c42997 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 27 Jun 2011 00:12:51 +0200 Subject: [PATCH] Correctly match platform specific PHP version numbers --- src/Composer/Repository/PlatformRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Repository/PlatformRepository.php b/src/Composer/Repository/PlatformRepository.php index 6b897229d..310d491dc 100644 --- a/src/Composer/Repository/PlatformRepository.php +++ b/src/Composer/Repository/PlatformRepository.php @@ -29,7 +29,7 @@ class PlatformRepository extends ArrayRepository try { $version = BasePackage::parseVersion(PHP_VERSION); } catch (\UnexpectedValueException $e) { - $version = BasePackage::parseVersion(preg_replace('#^(.+?)(-.+)?#', '$1', PHP_VERSION)); + $version = BasePackage::parseVersion(preg_replace('#^(.+?)(-.+)?$#', '$1', PHP_VERSION)); } // TODO mark as type platform and create a special installer that skips it + one that throws an exception