summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-10-17 16:02:10 +0200
committerRemi Collet <remi@remirepo.net>2018-10-17 16:02:10 +0200
commit7a3ba4eb845cefedc54246244ece644b7f97822d (patch)
treeb317e4c9a59098eaaada3609546f0e6c8e4bea5b
parent0a0ea3a096cfdaccff353aea53387a39136a9cbf (diff)
update to 2.5.14
fix FTBFS from Koschei add patch for PHP 7.3 from https://github.com/doctrine/doctrine2/pull/7431 use range dependencies
-rw-r--r--php-doctrine-orm-php72.patch104
-rw-r--r--php-doctrine-orm-php73.patch32
-rw-r--r--php-doctrine-orm.spec41
3 files changed, 66 insertions, 111 deletions
diff --git a/php-doctrine-orm-php72.patch b/php-doctrine-orm-php72.patch
deleted file mode 100644
index 80f9efe..0000000
--- a/php-doctrine-orm-php72.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-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-php73.patch b/php-doctrine-orm-php73.patch
new file mode 100644
index 0000000..a1543de
--- /dev/null
+++ b/php-doctrine-orm-php73.patch
@@ -0,0 +1,32 @@
+From 0ce35e5ac76db231cffa570ba4083dda7e706cfd Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 16 Oct 2018 12:24:02 +0200
+Subject: [PATCH] fix PHP 7.3 Warning: "continue" targeting switch is
+ equivalent to "break". Did you mean to use "continue 2"?
+
+---
+ lib/Doctrine/ORM/UnitOfWork.php | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php
+index fcbd3ab942..93d6e956fe 100644
+--- a/lib/Doctrine/ORM/UnitOfWork.php
++++ b/lib/Doctrine/ORM/UnitOfWork.php
+@@ -2633,7 +2633,7 @@ public function createEntity($className, array $data, &$hints = array())
+ $class->reflFields[$field]->setValue($entity, $data[$field]);
+ $this->originalEntityData[$oid][$field] = $data[$field];
+
+- continue;
++ break;
+ }
+
+ $associatedId = array();
+@@ -2662,7 +2662,7 @@ public function createEntity($className, array $data, &$hints = array())
+ $class->reflFields[$field]->setValue($entity, null);
+ $this->originalEntityData[$oid][$field] = null;
+
+- continue;
++ break;
+ }
+
+ if ( ! isset($hints['fetchMode'][$class->name][$field])) {
diff --git a/php-doctrine-orm.spec b/php-doctrine-orm.spec
index 1155934..e5b174b 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.12
-%global github_commit 984535cadc609e9eef8c89414aa3568ee97aa79f
+%global github_version 2.5.14
+%global github_commit 810a7baf81462a5ddf10e8baa8cb94b6eec02754
%global composer_vendor doctrine
%global composer_project orm
@@ -52,7 +52,7 @@
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 2%{?dist}
+Release: 1%{?dist}
Summary: Doctrine Object-Relational-Mapper (ORM)
Group: Development/Libraries
@@ -68,13 +68,22 @@ Source1: %{name}-get-source.sh
# 2) Auto-load using Doctrine\Common\ClassLoader
Patch0: %{name}-bin.patch
-Patch1: %{name}-php72.patch
+Patch1: %{name}-php73.patch
BuildArch: noarch
# Tests
%if %{with_tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-composer(doctrine/cache) >= %{cache_min_ver} with php-composer(doctrine/cache) < %{cache_max_ver})
+BuildRequires: (php-composer(doctrine/collections) >= %{collections_min_ver} with php-composer(doctrine/collections) < %{collections_max_ver})
+BuildRequires: (php-composer(doctrine/common) >= %{common_min_ver} with php-composer(doctrine/common) < %{common_max_ver})
+BuildRequires: (php-composer(doctrine/dbal) >= %{dbal_min_ver} with php-composer(doctrine/dbal) < %{dbal_max_ver})
+BuildRequires: (php-composer(doctrine/instantiator) >= %{instantiator_min_ver} with php-composer(doctrine/instantiator) < %{instantiator_max_ver})
+BuildRequires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver})
+BuildRequires: (php-composer(symfony/yaml) >= %{symfony_min_ver} with php-composer(symfony/yaml) < %{symfony_max_ver})
+%else
BuildRequires: php-composer(doctrine/cache) < %{cache_max_ver}
BuildRequires: php-composer(doctrine/cache) >= %{cache_min_ver}
BuildRequires: php-composer(doctrine/collections) < %{collections_max_ver}
@@ -90,6 +99,8 @@ BuildRequires: php-composer(symfony/console) < %{symfony_max_ver}
BuildRequires: php-composer(symfony/console) >= %{symfony_min_ver}
BuildRequires: php-composer(symfony/yaml) < %{symfony_max_ver}
BuildRequires: php-composer(symfony/yaml) >= %{symfony_min_ver}
+%endif
+BuildRequires: php-composer(phpunit/phpunit)
BuildRequires: php-pdo
# phpcompatinfo (computed from version 2.5.11)
BuildRequires: php-ctype
@@ -107,6 +118,16 @@ BuildRequires: php-composer(fedora/autoloader)
# composer.json
Requires: php(language) >= %{php_min_ver}
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-composer(doctrine/cache) >= %{cache_min_ver} with php-composer(doctrine/cache) < %{cache_max_ver})
+Requires: (php-composer(doctrine/collections) >= %{collections_min_ver} with php-composer(doctrine/collections) < %{collections_max_ver})
+Requires: (php-composer(doctrine/common) >= %{common_min_ver} with php-composer(doctrine/common) < %{common_max_ver})
+Requires: (php-composer(doctrine/dbal) >= %{dbal_min_ver} with php-composer(doctrine/dbal) < %{dbal_max_ver})
+Requires: (php-composer(doctrine/instantiator) >= %{instantiator_min_ver} with php-composer(doctrine/instantiator) < %{instantiator_max_ver})
+Requires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver})
+# composer.json: suggest
+Requires: (php-composer(symfony/yaml) >= %{symfony_min_ver} with php-composer(symfony/yaml) < %{symfony_max_ver})
+%else
Requires: php-composer(doctrine/cache) < %{cache_max_ver}
Requires: php-composer(doctrine/cache) >= %{cache_min_ver}
Requires: php-composer(doctrine/collections) < %{collections_max_ver}
@@ -119,10 +140,10 @@ Requires: php-composer(doctrine/instantiator) < %{instantiator_max_ver}
Requires: php-composer(doctrine/instantiator) >= %{instantiator_min_ver}
Requires: php-composer(symfony/console) < %{symfony_max_ver}
Requires: php-composer(symfony/console) >= %{symfony_min_ver}
-Requires: php-pdo
-# composer.json: suggest
Requires: php-composer(symfony/yaml) < %{symfony_max_ver}
Requires: php-composer(symfony/yaml) >= %{symfony_min_ver}
+%endif
+Requires: php-pdo
# phpcompatinfo (computed from version 2.5.11)
Requires: php-ctype
Requires: php-date
@@ -261,7 +282,7 @@ rm tests/Doctrine/Tests/ORM/Functional/Ticket/GH6464Test.php
: Upstream tests
RETURN_CODE=0
PHPUNIT=$(which phpunit)
-for PHP_EXEC in "" %{?rhel:php55} php56 php70 php71 php72; do
+for PHP_EXEC in "" %{?rhel:php55 php56} php70 php71 php72 php73; do
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
$PHP_EXEC $PHPUNIT --verbose -d memory_limit="512M" --bootstrap bootstrap.php \
|| RETURN_CODE=1
@@ -282,6 +303,12 @@ exit $RETURN_CODE
%changelog
+* Tue Oct 16 2018 Remi Collet <remi@remirepo.net> - 2.5.14-1
+- update to 2.5.14
+- fix FTBFS from Koschei add patch for PHP 7.3 from
+ https://github.com/doctrine/doctrine2/pull/7431
+- use range dependencies
+
* Fri Nov 10 2017 Remi Collet <remi@remirepo.net> - 2.5.12-2
- fix more tests failing since 7.1