summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json8
-rw-r--r--php-doctrine-annotations.spec90
2 files changed, 61 insertions, 37 deletions
diff --git a/composer.json b/composer.json
index e14ce93..00d0231 100644
--- a/composer.json
+++ b/composer.json
@@ -15,13 +15,15 @@
"require": {
"php": "^7.1 || ^8.0",
"ext-tokenizer": "*",
- "doctrine/lexer": "1.*"
+ "doctrine/lexer": "1.*",
+ "psr/cache": "^1 || ^2 || ^3"
},
"require-dev": {
- "doctrine/cache": "1.*",
+ "doctrine/cache": "^1.11 || ^2.0",
"doctrine/coding-standard": "^6.0 || ^8.1",
"phpstan/phpstan": "^0.12.20",
- "phpunit/phpunit": "^7.5 || ^9.1.5"
+ "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5",
+ "symfony/cache": "^4.4 || ^5.2"
},
"config": {
"sort-packages": true
diff --git a/php-doctrine-annotations.spec b/php-doctrine-annotations.spec
index 84daaf3..24ee74d 100644
--- a/php-doctrine-annotations.spec
+++ b/php-doctrine-annotations.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-doctrine-annotations
#
-# Copyright (c) 2013-2020 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Copyright (c) 2013-2021 Shawn Iwinski <shawn.iwinski@gmail.com>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -15,22 +15,29 @@
%global github_owner doctrine
%global github_name annotations
-%global github_version 1.12.1
-%global github_commit b17c5014ef81d212ac539f07a1001832df1b6d3b
+%global github_version 1.13.1
+%global github_commit e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f
%global composer_vendor doctrine
%global composer_project annotations
# "php": "^7.1 || ^8.0"
%global php_min_ver 7.1
-# "doctrine/cache": "1.*"
-# NOTE: Min version not 1.0 because autoloader required
-%global cache_min_ver 1.4.1
-%global cache_max_ver 2.0
+# "doctrine/cache": "^1.11 || ^2."
+%global cache_min_ver 1.11
+# only v1 is available for now
+%global cache_max_ver 2
# "doctrine/lexer": "1.*"
# NOTE: Min version not 1.0 because autoloader required
%global lexer_min_ver 1.0.1
%global lexer_max_ver 2.0
+# "psr/cache": "^1 || ^2 || ^3"
+%global psr_cache_min_ver 1
+# only v1 is available for now
+%global psr_cache_max_ver 2
+# "symfony/cache": "^4.4 || ^5.2"
+%global symfony_min_ver 4.4
+%global symfony_max_ver 6
%{!?phpdir: %global phpdir %{_datadir}/php}
@@ -53,23 +60,24 @@ BuildArch: noarch
%if %{with tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
+# remirepo:1
%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/lexer) >= %{lexer_min_ver} with php-composer(doctrine/lexer) < %{lexer_max_ver})
+BuildRequires:(php-composer(psr/cache) >= %{psr_cache_min_ver} with php-composer(psr/cache) < %{psr_cache_max_ver})
+BuildRequires:(php-composer(symfony/cache) >= %{symfony_min_ver} with php-composer(symfony/cache) < %{symfony_max_ver})
+# remirepo:8
%else
-BuildRequires: php-composer(doctrine/cache) < %{cache_max_ver}
-BuildRequires: php-composer(doctrine/cache) >= %{cache_min_ver}
-BuildRequires: php-composer(doctrine/lexer) < %{lexer_max_ver}
-BuildRequires: php-composer(doctrine/lexer) >= %{lexer_min_ver}
-# "phpunit/phpunit": "^7.5 || ^9.1.5"
-%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9
+BuildRequires: php-doctrine-cache < %{cache_max_ver}
+BuildRequires: php-doctrine-cache >= %{cache_min_ver}
+BuildRequires: php-doctrine-lexer < %{lexer_max_ver}
+BuildRequires: php-doctrine-lexer >= %{lexer_min_ver}
+BuildRequires: php-psr-cache >= %{psr_cache_min_ver}
+BuildRequires: php-symfony4-cache >= %{symfony_min_ver}
+%endif
+# "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5"
%global phpunit %{_bindir}/phpunit9
BuildRequires: phpunit9 >= 9.1.5
-%else
-%global phpunit %{_bindir}/phpunit7
-BuildRequires: phpunit7 >= 7.5
-%endif
-%endif
## phpcompatinfo (computed from version 1.10.0)
BuildRequires: php-ctype
@@ -80,18 +88,23 @@ BuildRequires: php-pcre
BuildRequires: php-reflection
BuildRequires: php-spl
BuildRequires: php-tokenizer
+%endif
# Autoloader
BuildRequires: php-composer(fedora/autoloader)
-%endif
# composer.json
Requires: php(language) >= %{php_min_ver}
Requires: php-tokenizer
+# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
Requires: (php-composer(doctrine/lexer) >= %{lexer_min_ver} with php-composer(doctrine/lexer) < %{lexer_max_ver})
+Requires: (php-composer(psr/cache) >= %{psr_cache_min_ver} with php-composer(psr/cache) < %{psr_cache_max_ver})
+# remirepo:6
%else
-Requires: php-composer(doctrine/lexer) < %{lexer_max_ver}
-Requires: php-composer(doctrine/lexer) >= %{lexer_min_ver}
+Requires: php-doctrine-lexer < %{lexer_max_ver}
+Requires: php-doctrine-lexer >= %{lexer_min_ver}
+Requires: php-psr-cache < %{psr_cache_max_ver}
+Requires: php-psr-cache >= %{psr_cache_min_ver}
%endif
# phpcompatinfo (computed from version 1.10.0)
Requires: php-ctype
@@ -131,9 +144,10 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Common\\Annotations\\', __DIR__);
-\Fedora\Autoloader\Dependencies::required(array(
+\Fedora\Autoloader\Dependencies::required([
'%{phpdir}/Doctrine/Common/Lexer/autoload.php',
-));
+ '%{phpdir}/Psr/Cache/autoload.php',
+]);
AUTOLOAD
@@ -144,28 +158,31 @@ cp -rp lib/* %{buildroot}%{phpdir}/
%check
%if %{with tests}
-: Modify tests init
-sed "s#require.*autoload.*#require_once '%{buildroot}%{phpdir}/Doctrine/Common/Annotations/autoload.php';#" \
- -i tests/Doctrine/Tests/TestInit.php
-
: Create tests bootstrap
-cat <<'BOOTSTRAP' | tee bootstrap.php
+mkdir vendor
+cat <<'BOOTSTRAP' | tee vendor/autoload.php
<?php
-require_once '%{phpdir}/Doctrine/Common/Cache/autoload.php';
-require_once __DIR__.'/tests/Doctrine/Tests/TestInit.php';
-require_once __DIR__.'/tests/Doctrine/Tests/Common/Annotations/Fixtures/functions.php';
-require_once __DIR__.'/tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php';
+require_once '%{buildroot}%{phpdir}/Doctrine/Common/Annotations/autoload.php';
+\Fedora\Autoloader\Dependencies::required([
+ '%{phpdir}/Doctrine/Common/Cache/autoload.php',
+ [
+ '%{phpdir}/Symfony5/Component/Cache/autoload.php',
+ '%{phpdir}/Symfony4/Component/Cache/autoload.php',
+ ],
+ dirname( __DIR__) . '/tests/Doctrine/Tests/TestInit.php',
+ dirname( __DIR__) . '/tests/Doctrine/Tests/Common/Annotations/Fixtures/functions.php',
+ dirname( __DIR__) . '/tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php',
+]);
BOOTSTRAP
: Upstream tests
RETURN_CODE=0
-for CMD in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do
+for CMD in "php %{phpunit}" php73 php74 php80; do
if which $CMD; then
set $CMD
$1 ${2:-%{_bindir}/phpunit9} --verbose \
-d pcre.recursion_limit=10000 \
--filter '^((?!(testAvoidCallingFilemtimeTooMuch)).)*$' \
- --bootstrap bootstrap.php \
|| RETURN_CODE=1
fi
done
@@ -184,6 +201,11 @@ exit $RETURN_CODE
%changelog
+* Mon May 17 2021 Remi Collet <remi@remirepo.net> - 1.13.1-1
+- update to 1.13.1
+- add runtime dependency on psr/cache
+- add build dependency on symfony/cache
+
* Wed Feb 24 2021 Remi Collet <remi@remirepo.net> - 1.12.1-1
- update to 1.12.1