summaryrefslogtreecommitdiffstats
path: root/php-doctrine-orm.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-doctrine-orm.spec')
-rw-r--r--php-doctrine-orm.spec111
1 files changed, 53 insertions, 58 deletions
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