From 72750b05e64e5f67b865eb67c91892d42329e610 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Sat, 31 May 2014 13:37:39 +0200 Subject: [PATCH] Using `PHP_VERSION_ID` instead of `version_compare` to see if we're using PHP 5.4+ --- lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index 5fe858714..1216fcfb8 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -908,8 +908,8 @@ class ClassMetadataInfo implements ClassMetadata public function newInstance() { if ($this->_prototype === null) { - if (version_compare(PHP_VERSION, '5.4') >= 0) { - $rc = new \ReflectionClass($this->name); + if (PHP_VERSION_ID >= 50400) { + $rc = new \ReflectionClass($this->name); $this->_prototype = $rc->newInstanceWithoutConstructor(); } else { $this->_prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name));