diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-10-20 17:59:49 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-10-20 17:59:49 +0200 |
commit | ccbf4563591bdcb18d9db6fce1862a5eeb7ccaa7 (patch) | |
tree | cf9ec5c7b23cf42277fe408e20d012bc3cc9e74e /php-doctrine-orm-upstream.patch | |
parent | 930be112dcddd4604eae9450522fdafa9438890a (diff) |
php-doctrine-orm: sync with rawhide
Diffstat (limited to 'php-doctrine-orm-upstream.patch')
-rw-r--r-- | php-doctrine-orm-upstream.patch | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/php-doctrine-orm-upstream.patch b/php-doctrine-orm-upstream.patch deleted file mode 100644 index b2dff4c..0000000 --- a/php-doctrine-orm-upstream.patch +++ /dev/null @@ -1,73 +0,0 @@ -Adapted for 2.4 from: - -From 361ec2a474d78168473fb82a041f32c4b7665643 Mon Sep 17 00:00:00 2001 -From: Marco Pivetta <ocramius@gmail.com> -Date: Thu, 14 Aug 2014 15:51:48 +0200 -Subject: [PATCH] DDC-3120 - using `Doctrine\Instantiator` when building new - instances - ---- - lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php | 21 +++++++-------------- - 1 file changed, 7 insertions(+), 14 deletions(-) - -diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php -index 5d36f64..f8b4bb7 100644 ---- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php -+++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php -@@ -20,6 +20,7 @@ - namespace Doctrine\ORM\Mapping; - - use BadMethodCallException; -+use Doctrine\Instantiator\Instantiator; - use InvalidArgumentException; - use RuntimeException; - use Doctrine\DBAL\Types\Type; -@@ -610,11 +611,9 @@ class ClassMetadataInfo implements Class - public $reflFields = array(); - - /** -- * The prototype from which new instances of the mapped class are created. -- * -- * @var object -+ * @var \Doctrine\Instantiator\InstantiatorInterface|null - */ -- private $_prototype; -+ private $instantiator; - - /** - * Initializes a new ClassMetadata instance that will hold the object-relational mapping -@@ -628,6 +627,7 @@ class ClassMetadataInfo implements Class - $this->name = $entityName; - $this->rootEntityName = $entityName; - $this->namingStrategy = $namingStrategy ?: new DefaultNamingStrategy(); -+ $this->instantiator = new Instantiator(); - } - - /** -@@ -865,15 +865,7 @@ class ClassMetadataInfo implements Class - */ - public function newInstance() - { -- if ($this->_prototype === null) { -- 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)); -- } -- } -- -- return clone $this->_prototype; -+ return $this->instantiator->instantiate($this->name); - } - /** - * Restores some state that can not be serialized/unserialized. -@@ -885,7 +877,8 @@ class ClassMetadataInfo implements Class - public function wakeupReflection($reflService) - { - // Restore ReflectionClass and properties -- $this->reflClass = $reflService->getClass($this->name); -+ $this->reflClass = $reflService->getClass($this->name); -+ $this->instantiator = $this->instantiator ?: new Instantiator(); - - foreach ($this->fieldMappings as $field => $mapping) { - $this->reflFields[$field] = isset($mapping['declared']) |