diff options
Diffstat (limited to 'php-doctrine-orm-php72.patch')
-rw-r--r-- | php-doctrine-orm-php72.patch | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/php-doctrine-orm-php72.patch b/php-doctrine-orm-php72.patch new file mode 100644 index 0000000..80f9efe --- /dev/null +++ b/php-doctrine-orm-php72.patch @@ -0,0 +1,104 @@ +From 446d41d69926a71816fb0ef27e0bc1570bcd7c49 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 10 Nov 2017 12:46:05 +0100 +Subject: [PATCH 1/3] fix for 7.2, don't mock getResultSetMapping to properly + get an empty array instead if null + +--- + tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php b/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php +index 039bb16553..c86c7eccd6 100644 +--- a/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php ++++ b/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php +@@ -128,7 +128,7 @@ public function testQueryCache_HitDoesNotSaveParserResult() + ->method('execute') + ->will($this->returnValue( 10 )); + +- $parserResultMock = $this->getMock('Doctrine\ORM\Query\ParserResult'); ++ $parserResultMock = $this->getMock('Doctrine\ORM\Query\ParserResult', ['getSqlExecutor']); + $parserResultMock->expects($this->once()) + ->method('getSqlExecutor') + ->will($this->returnValue($sqlExecMock)); + +From 7df3876c76d916a8d76760d5006a814516ea3d83 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 10 Nov 2017 13:10:48 +0100 +Subject: [PATCH 2/3] Fix ReflectionException: Given object is not an instance + of the class this property was declared in + +--- + .../Entity/NonStrictReadWriteCachedEntityPersisterTest.php | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php +index 6cf3fea3b0..538aed414a 100644 +--- a/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php ++++ b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php +@@ -28,7 +28,7 @@ public function testTransactionRollBackShouldClearQueue() + { + $entity = new Country("Foo"); + $persister = $this->createPersisterDefault(); +- $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache'); ++ $property = new \ReflectionProperty($persister, 'queuedCache'); + + $property->setAccessible(true); + +@@ -50,7 +50,7 @@ public function testInsertTransactionCommitShouldPutCache() + $persister = $this->createPersisterDefault(); + $key = new EntityCacheKey(Country::CLASSNAME, array('id'=>1)); + $entry = new EntityCacheEntry(Country::CLASSNAME, array('id'=>1, 'name'=>'Foo')); +- $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache'); ++ $property = new \ReflectionProperty($persister, 'queuedCache'); + + $property->setAccessible(true); + +@@ -87,7 +87,7 @@ public function testUpdateTransactionCommitShouldPutCache() + $persister = $this->createPersisterDefault(); + $key = new EntityCacheKey(Country::CLASSNAME, array('id'=>1)); + $entry = new EntityCacheEntry(Country::CLASSNAME, array('id'=>1, 'name'=>'Foo')); +- $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache'); ++ $property = new \ReflectionProperty($persister, 'queuedCache'); + + $property->setAccessible(true); + +@@ -115,7 +115,7 @@ public function testDeleteTransactionCommitShouldEvictCache() + $entity = new Country("Foo"); + $persister = $this->createPersisterDefault(); + $key = new EntityCacheKey(Country::CLASSNAME, array('id'=>1)); +- $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache'); ++ $property = new \ReflectionProperty($persister, 'queuedCache'); + + $property->setAccessible(true); + + +From 61f209d9a5384550f871c319d28636eed141c717 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 10 Nov 2017 13:24:33 +0100 +Subject: [PATCH 3/3] fix skip condition for APC + +--- + tests/Doctrine/Tests/ORM/Cache/DefaultRegionTest.php | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/Doctrine/Tests/ORM/Cache/DefaultRegionTest.php b/tests/Doctrine/Tests/ORM/Cache/DefaultRegionTest.php +index 914bcf1917..b0ad000a70 100644 +--- a/tests/Doctrine/Tests/ORM/Cache/DefaultRegionTest.php ++++ b/tests/Doctrine/Tests/ORM/Cache/DefaultRegionTest.php +@@ -27,7 +27,7 @@ public function testGetters() + + public function testSharedRegion() + { +- if ( ! extension_loaded('apc') || false === @apc_cache_info()) { ++ if ( ! extension_loaded('apc') || ! is_array(@apc_cache_info("user"))) { + $this->markTestSkipped('The ' . __CLASS__ .' requires the use of APC'); + } + +@@ -97,4 +97,4 @@ public function testGetMulti() + $this->assertEquals($value1, $actual[0]); + $this->assertEquals($value2, $actual[1]); + } +-} +\ No newline at end of file ++} |