1
0
Fork 0

hhvm version constant still called HPHP on older versions so use it for bc

pull/2333/head
Nils Adermann 2013-10-14 14:54:08 -07:00
parent 4c8e8ca702
commit 4f51db72f8
1 changed files with 3 additions and 3 deletions

View File

@ -145,12 +145,12 @@ class PlatformRepository extends ArrayRepository
parent::addPackage($lib);
}
if (defined('HHVM_VERSION')) {
if (defined('HPHP_VERSION')) {
try {
$prettyVersion = HHVM_VERSION;
$prettyVersion = HPHP_VERSION;
$version = $versionParser->normalize($prettyVersion);
} catch (\UnexpectedValueException $e) {
$prettyVersion = preg_replace('#^([^~+-]+).*$#', '$1', HHVM_VERSION);
$prettyVersion = preg_replace('#^([^~+-]+).*$#', '$1', HPHP_VERSION);
$version = $versionParser->normalize($prettyVersion);
}