Explorar o código

Correctly match platform specific PHP version numbers

Nils Adermann %!s(int64=13) %!d(string=hai) anos
pai
achega
c225b4c689
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Composer/Repository/PlatformRepository.php

+ 1 - 1
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