From a69584a841efdb1312c8410ade2489c3f558752f Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Mon, 6 Oct 2014 14:26:00 +0200 Subject: [PATCH] DDC-3120 - Using `ReflectionClass#newInstanceWithoutConstructor()` also with PHP 5.6+ --- lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index 4880055b3..88c905baf 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -866,7 +866,7 @@ class ClassMetadataInfo implements ClassMetadata public function newInstance() { if ($this->_prototype === null) { - if (PHP_VERSION_ID === 50429 || PHP_VERSION_ID === 50513) { + if (PHP_VERSION_ID === 50429 || PHP_VERSION_ID === 50513 || PHP_VERSION_ID >= 50600) { $this->_prototype = $this->reflClass->newInstanceWithoutConstructor(); } else { $this->_prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name));