summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-10-17 17:31:28 +0200
committerRemi Collet <remi@remirepo.net>2018-10-17 17:31:28 +0200
commit3cd9d08dd8200462615c1e53c790d741ba8096b1 (patch)
treef2f7dd446d77998cf86dec9561d328b7176081d6
parent7a3ba4eb845cefedc54246244ece644b7f97822d (diff)
update to 2.6.2
raise dependency on PHP 7.1 add dependency on doctrine/annotations raise dependency on doctrine/cache 1.6 raise dependency on doctrine/collections 1.4 raise dependency on doctrine/common 2.7.1 raise dependency on doctrine/dbal 2.6 raise dependency on doctrine/instantiator 1.1 switch to symfony 3 and 4 switch to phpunit6
-rw-r--r--php-doctrine-orm-bin.patch11
-rw-r--r--php-doctrine-orm-php73.patch17
-rw-r--r--php-doctrine-orm.spec111
3 files changed, 68 insertions, 71 deletions
diff --git a/php-doctrine-orm-bin.patch b/php-doctrine-orm-bin.patch
index 08c7645..4b6ffa5 100644
--- a/php-doctrine-orm-bin.patch
+++ b/php-doctrine-orm-bin.patch
@@ -7,19 +7,22 @@ index 842c5493f..e1ccb7506 100755
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-@@ -20,14 +21,7 @@
+@@ -20,17 +21,7 @@
use Symfony\Component\Console\Helper\HelperSet;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
--$autoloadFiles = array(__DIR__ . '/../vendor/autoload.php',
-- __DIR__ . '/../../../autoload.php');
+-$autoloadFiles = [
+- __DIR__ . '/../vendor/autoload.php',
+- __DIR__ . '/../../../autoload.php'
+-];
-
-foreach ($autoloadFiles as $autoloadFile) {
- if (file_exists($autoloadFile)) {
- require_once $autoloadFile;
+- break;
- }
-}
+require_once '__PHPDIR__/Doctrine/ORM/autoload.php';
- $directories = array(getcwd(), getcwd() . DIRECTORY_SEPARATOR . 'config');
+ $directories = [getcwd(), getcwd() . DIRECTORY_SEPARATOR . 'config'];
diff --git a/php-doctrine-orm-php73.patch b/php-doctrine-orm-php73.patch
index a1543de..d0b3f2b 100644
--- a/php-doctrine-orm-php73.patch
+++ b/php-doctrine-orm-php73.patch
@@ -1,18 +1,17 @@
-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"?
+From 07fc401d255a4cdb4a557147d1c8a3fc7a0c718d Mon Sep 17 00:00:00 2001
+From: Cyril PASCAL <cyril.pascal_github@m4x.org>
+Date: Thu, 26 Jul 2018 14:32:52 +0200
+Subject: [PATCH] Make code php 7.3 lint-compatible
---
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
+index 6767e7ef31..c79afd084e 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())
+@@ -2715,7 +2715,7 @@ public function createEntity($className, array $data, &$hints = [])
$class->reflFields[$field]->setValue($entity, $data[$field]);
$this->originalEntityData[$oid][$field] = $data[$field];
@@ -20,8 +19,8 @@ index fcbd3ab942..93d6e956fe 100644
+ break;
}
- $associatedId = array();
-@@ -2662,7 +2662,7 @@ public function createEntity($className, array $data, &$hints = array())
+ $associatedId = [];
+@@ -2744,7 +2744,7 @@ public function createEntity($className, array $data, &$hints = [])
$class->reflFields[$field]->setValue($entity, null);
$this->originalEntityData[$oid][$field] = null;
diff --git a/php-doctrine-orm.spec b/php-doctrine-orm.spec
index e5b174b..342f784 100644
--- a/php-doctrine-orm.spec
+++ b/php-doctrine-orm.spec
@@ -13,37 +13,36 @@
%global github_owner doctrine
%global github_name doctrine2
-%global github_version 2.5.14
-%global github_commit 810a7baf81462a5ddf10e8baa8cb94b6eec02754
+%global github_version 2.6.2
+%global github_commit d2b4dd71d2a276edd65d0c170375b445f8a4a4a8
%global composer_vendor doctrine
%global composer_project orm
-# "php": ">=5.4"
-%global php_min_ver 5.4
-# "doctrine/cache": "~1.4"
-# NOTE: Min version not 1.4.0 because autoloader required
-%global cache_min_ver 1.4.1
+# "php": "^7.1"
+%global php_min_ver 7.1
+# "doctrine/annotations": "~1.5",
+%global annotations_min_ver 1.5
+%global annotations_max_ver 2
+# "doctrine/cache": "~1.6"
+%global cache_min_ver 1.6
%global cache_max_ver 2
-# "doctrine/collections": "~1.2"
-# NOTE: Min version not 1.2 because autoloader required
-%global collections_min_ver 1.3
-%global collections_max_ver 2.0
-# "doctrine/common": ">=2.5-dev,<2.9-dev"
-%global common_min_ver 2.5
-%global common_max_ver 2.9
-# "doctrine/dbal": ">=2.5-dev,<2.7-dev"
-# NOTE: Min version not 2.4 because autoloader required
-%global dbal_min_ver 2.5.4
-%global dbal_max_ver 2.7
-# "doctrine/instantiator": "^1.0.1"
-%global instantiator_min_ver 1.0.1
-%global instantiator_max_ver 2.0
-# "symfony/console": "~2.5|~3.0"
-# "symfony/yaml": "~2.3|~3.0"
-# NOTE: Min version not 2.5 because autoloader required
-%global symfony_min_ver 2.7.1
-%global symfony_max_ver 4.0
+# "doctrine/collections": "~1.4"
+%global collections_min_ver 1.4
+%global collections_max_ver 2
+# "doctrine/common": "^2.7.1"
+%global common_min_ver 2.7.1
+%global common_max_ver 3
+# "doctrine/dbal": "^2.6"
+%global dbal_min_ver 2.6
+%global dbal_max_ver 3
+# "doctrine/instantiator": "^1.1"
+%global instantiator_min_ver 1.1
+%global instantiator_max_ver 2
+# "symfony/console": "~3.0|~4.0"
+# "symfony/yaml": "~3.4|~4.0"
+%global symfony_min_ver 3.4
+%global symfony_max_ver 5
%{!?phpdir: %global phpdir %{_datadir}/php}
@@ -67,7 +66,6 @@ Source1: %{name}-get-source.sh
# 1) Add she-bang
# 2) Auto-load using Doctrine\Common\ClassLoader
Patch0: %{name}-bin.patch
-
Patch1: %{name}-php73.patch
BuildArch: noarch
@@ -76,6 +74,7 @@ BuildArch: noarch
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-composer(doctrine/annotations) >= %{annotations_min_ver} with php-composer(doctrine/annotations) < %{annotations_max_ver})
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})
@@ -84,6 +83,8 @@ BuildRequires: (php-composer(doctrine/instantiator) >= %{instantiator_min_ver} w
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/annotations) < %{annotations_max_ver}
+BuildRequires: php-composer(doctrine/annotations) >= %{annotations_min_ver}
BuildRequires: php-composer(doctrine/cache) < %{cache_max_ver}
BuildRequires: php-composer(doctrine/cache) >= %{cache_min_ver}
BuildRequires: php-composer(doctrine/collections) < %{collections_max_ver}
@@ -94,13 +95,12 @@ BuildRequires: php-composer(doctrine/dbal) < %{dbal_max_ver}
BuildRequires: php-composer(doctrine/dbal) >= %{dbal_min_ver}
BuildRequires: php-composer(doctrine/instantiator) < %{instantiator_max_ver}
BuildRequires: php-composer(doctrine/instantiator) >= %{instantiator_min_ver}
-BuildRequires: php-composer(phpunit/phpunit)
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: phpunit6 >= 6.5
BuildRequires: php-pdo
# phpcompatinfo (computed from version 2.5.11)
BuildRequires: php-ctype
@@ -119,6 +119,7 @@ BuildRequires: php-composer(fedora/autoloader)
# composer.json
Requires: php(language) >= %{php_min_ver}
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-composer(doctrine/annotations) >= %{annotations_min_ver} with php-composer(doctrine/annotations) < %{annotations_max_ver})
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})
@@ -128,6 +129,8 @@ Requires: (php-composer(symfony/console) >= %{symfony_min_ver} w
# composer.json: suggest
Requires: (php-composer(symfony/yaml) >= %{symfony_min_ver} with php-composer(symfony/yaml) < %{symfony_max_ver})
%else
+Requires: php-composer(doctrine/annotations) < %{annotations_max_ver}
+Requires: php-composer(doctrine/annotations) >= %{annotations_min_ver}
Requires: php-composer(doctrine/cache) < %{cache_max_ver}
Requires: php-composer(doctrine/cache) >= %{cache_min_ver}
Requires: php-composer(doctrine/collections) < %{collections_max_ver}
@@ -189,7 +192,7 @@ Autoloader: %{phpdir}/Doctrine/ORM/autoload.php
%setup -qn %{github_name}-%{github_commit}
: Patch bin script
-%patch0 -p1
+%patch0 -p1 -b .rpm
sed -i 's#__PHPDIR__#%{phpdir}#g' bin/doctrine.php
%patch1 -p1
@@ -216,15 +219,15 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
'%{phpdir}/Doctrine/DBAL/autoload.php',
'%{phpdir}/Doctrine/Instantiator/autoload.php',
[
+ '%{phpdir}/Symfony4/Component/Console/autoload.php',
'%{phpdir}/Symfony3/Component/Console/autoload.php',
- '%{phpdir}/Symfony/Component/Console/autoload.php',
],
]);
\Fedora\Autoloader\Dependencies::optional([
[
- '%{phpdir}/Symfony3/Component/Yaml/autoload.php',
- '%{phpdir}/Symfony/Component/Yaml/autoload.php',
+ '%{phpdir}/Symfony4/Component/Yaml/autoload.php',
+ '%{phpdir}/Symfony3Component/Yaml/autoload.php',
],
]);
AUTOLOAD
@@ -256,35 +259,14 @@ cat > bootstrap.php <<'BOOTSTRAP'
<?php
require_once '%{buildroot}%{phpdir}/Doctrine/ORM/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Tests\\', __DIR__.'/tests/Doctrine/Tests');
+\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Performance\\', __DIR__.'/tests/Doctrine/Performance');
BOOTSTRAP
-: Skip tests known to fail
-sed \
- -e 's/function testLoadedAssociationToManyShouldTriggerEvent/function SKIP_testLoadedAssociationToManyShouldTriggerEvent/' \
- -e 's/function testLoadedAssociationToOneShouldTriggerEvent/function SKIP_testLoadedAssociationToOneShouldTriggerEvent/' \
- -e 's/function testLoadedEntityUsingFindShouldTriggerEvent/function SKIP_testLoadedEntityUsingFindShouldTriggerEvent/' \
- -e 's/function testLoadedEntityUsingQueryShouldTriggerEvent/function SKIP_testLoadedEntityUsingQueryShouldTriggerEvent/' \
- -e 's/function testLoadedProxyAssociationToManyShouldTriggerEvent/function SKIP_testLoadedProxyAssociationToManyShouldTriggerEvent/' \
- -e 's/function testLoadedProxyAssociationToOneShouldTriggerEvent/function SKIP_testLoadedProxyAssociationToOneShouldTriggerEvent/' \
- -e 's/function testLoadedProxyEntityShouldTriggerEvent/function SKIP_testLoadedProxyEntityShouldTriggerEvent/' \
- -e 's/function testLoadedProxyPartialShouldTriggerEvent/function SKIP_testLoadedProxyPartialShouldTriggerEvent/' \
- -i tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php
-sed 's/function testQueryCache_NoHitSaveParserResult/function SKIP_testQueryCache_NoHitSaveParserResult/' \
- -i tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php
-rm -f \
- tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2692Test.php \
- tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3123Test.php
-
-%if 0%{?rhel} < 7
-rm tests/Doctrine/Tests/ORM/Functional/Ticket/GH6464Test.php
-%endif
-
: Upstream tests
RETURN_CODE=0
-PHPUNIT=$(which phpunit)
-for PHP_EXEC in "" %{?rhel:php55 php56} php70 php71 php72 php73; do
+for PHP_EXEC in "" php71 php72 php73; do
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
- $PHP_EXEC $PHPUNIT --verbose -d memory_limit="512M" --bootstrap bootstrap.php \
+ $PHP_EXEC %{_bindir}/phpunit6 --verbose -d memory_limit="512M" --bootstrap bootstrap.php \
|| RETURN_CODE=1
fi
done
@@ -297,12 +279,25 @@ exit $RETURN_CODE
%files
%{!?_licensedir:%global license %%doc}
%license LICENSE
-%doc *.md *.markdown composer.json
+%doc *.md
+%doc composer.json
%{phpdir}/Doctrine/ORM
%{_bindir}/doctrine
%changelog
+* Wed Oct 17 2018 Remi Collet <remi@remirepo.net> - 2.6.2-1
+- update to 2.6.2
+- raise dependency on PHP 7.1
+- add dependency on doctrine/annotations
+- raise dependency on doctrine/cache 1.6
+- raise dependency on doctrine/collections 1.4
+- raise dependency on doctrine/common 2.7.1
+- raise dependency on doctrine/dbal 2.6
+- raise dependency on doctrine/instantiator 1.1
+- switch to symfony 3 and 4
+- switch to phpunit6
+
* 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