diff options
| -rw-r--r-- | composer.json | 4 | ||||
| -rw-r--r-- | php-doctrine-orm-php72.patch | 104 | ||||
| -rw-r--r-- | php-doctrine-orm.spec | 28 | 
3 files changed, 120 insertions, 16 deletions
| diff --git a/composer.json b/composer.json index 1036b4a..a2ec7ce 100644 --- a/composer.json +++ b/composer.json @@ -20,10 +20,10 @@          "doctrine/instantiator": "^1.0.1",          "doctrine/common": ">=2.5-dev,<2.9-dev",          "doctrine/cache": "~1.4", -        "symfony/console": "~2.5|~3.0" +        "symfony/console": "~2.5|~3.0|~4.0"      },      "require-dev": { -        "symfony/yaml": "~2.3|~3.0", +        "symfony/yaml": "~2.3|~3.0|~4.0",          "phpunit/phpunit": "~4.0"      },      "suggest": { 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 ++} diff --git a/php-doctrine-orm.spec b/php-doctrine-orm.spec index ada4ad0..1155934 100644 --- a/php-doctrine-orm.spec +++ b/php-doctrine-orm.spec @@ -13,8 +13,8 @@  %global github_owner     doctrine  %global github_name      doctrine2 -%global github_version   2.5.11 -%global github_commit    249b737094f1e7cba4f0a8d19acf5be6cf3ed504 +%global github_version   2.5.12 +%global github_commit    984535cadc609e9eef8c89414aa3568ee97aa79f  %global composer_vendor  doctrine  %global composer_project orm @@ -52,7 +52,7 @@  Name:          php-%{composer_vendor}-%{composer_project}  Version:       %{github_version} -Release:       1%{?dist} +Release:       2%{?dist}  Summary:       Doctrine Object-Relational-Mapper (ORM)  Group:         Development/Libraries @@ -68,6 +68,8 @@ Source1:       %{name}-get-source.sh  # 2) Auto-load using Doctrine\Common\ClassLoader  Patch0:        %{name}-bin.patch +Patch1:        %{name}-php72.patch +  BuildArch: noarch  # Tests  %if %{with_tests} @@ -168,6 +170,7 @@ Autoloader: %{phpdir}/Doctrine/ORM/autoload.php  : Patch bin script  %patch0 -p1  sed -i 's#__PHPDIR__#%{phpdir}#g' bin/doctrine.php +%patch1 -p1  : Remove empty file  rm -f lib/Doctrine/ORM/README.markdown @@ -236,12 +239,6 @@ BOOTSTRAP  : Skip tests known to fail  sed \ -    -e 's/function testDeleteTransactionCommitShouldEvictCache/function SKIP_testDeleteTransactionCommitShouldEvictCache/' \ -    -e 's/function testInsertTransactionCommitShouldPutCache/function SKIP_testInsertTransactionCommitShouldPutCache/' \ -    -e 's/function testTransactionRollBackShouldClearQueue/function SKIP_testTransactionRollBackShouldClearQueue/' \ -    -e 's/function testUpdateTransactionCommitShouldPutCache/function SKIP_testUpdateTransactionCommitShouldPutCache/' \ -    -i  tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php -sed \      -e 's/function testLoadedAssociationToManyShouldTriggerEvent/function SKIP_testLoadedAssociationToManyShouldTriggerEvent/' \      -e 's/function testLoadedAssociationToOneShouldTriggerEvent/function SKIP_testLoadedAssociationToOneShouldTriggerEvent/' \      -e 's/function testLoadedEntityUsingFindShouldTriggerEvent/function SKIP_testLoadedEntityUsingFindShouldTriggerEvent/' \ @@ -266,11 +263,6 @@ RETURN_CODE=0  PHPUNIT=$(which phpunit)  for PHP_EXEC in "" %{?rhel:php55} php56 php70 php71 php72; do      if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then -        if [ $($PHP_EXEC -r 'echo PHP_VERSION_ID;') -ge 70200 ]; then -            sed 's/function testQueryCache_HitDoesNotSaveParserResult/function SKIP_testQueryCache_HitDoesNotSaveParserResult/' \ -                -i tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php -        fi -          $PHP_EXEC $PHPUNIT --verbose -d memory_limit="512M" --bootstrap bootstrap.php \              || RETURN_CODE=1      fi @@ -290,6 +282,14 @@ exit $RETURN_CODE  %changelog +* Fri Nov 10 2017 Remi Collet <remi@remirepo.net> - 2.5.12-2 +- fix more tests failing since 7.1 + +* Fri Nov 10 2017 Remi Collet <remi@remirepo.net> - 2.5.12-1 +- Update to 2.5.12 +- fix FTBFS from Koschei add patch for PHP 7.2 from +  https://github.com/doctrine/doctrine2/pull/6821 +  * Wed Sep 20 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 2.5.11-1  - Updated to 2.5.11 (RHBZ #1207905) | 
