summaryrefslogtreecommitdiffstats
path: root/php-doctrine-cache.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-05-19 10:29:36 +0200
committerRemi Collet <remi@remirepo.net>2021-05-19 10:29:36 +0200
commitb343f413f3e4d90000f4dda5f5a66a8a477d9331 (patch)
tree28677ee1c89b8255a29fbae6e43ee14f9987eae7 /php-doctrine-cache.spec
parenta4691cc63d418fc227cbd7df30a6dfd541c018f2 (diff)
update to 1.11.1
Diffstat (limited to 'php-doctrine-cache.spec')
-rw-r--r--php-doctrine-cache.spec54
1 files changed, 47 insertions, 7 deletions
diff --git a/php-doctrine-cache.spec b/php-doctrine-cache.spec
index c5dc150..0e0585b 100644
--- a/php-doctrine-cache.spec
+++ b/php-doctrine-cache.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-doctrine-cache
#
-# Copyright (c) 2013-2018 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Copyright (c) 2013-2021 Shawn Iwinski <shawn.iwinski@gmail.com>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,12 +12,23 @@
%global github_owner doctrine
%global github_name cache
-%global github_version 1.10.2
-%global github_commit 13e3381b25847283a91948d04640543941309727
+%global github_version 1.11.1
+%global github_commit 163074496dc7c3c7b8ccbf3d4376c0187424ed81
%global composer_vendor doctrine
%global composer_project cache
+# "cache/integration-tests": "dev-master",
+%global cache_integration_tests_min_ver 0.17
+
+# "symfony/cache": "^4.4 || ^5.2"
+%global symfony_min_ver 4.4
+%global symfony_max_ver 5.2
+
+# "psr/cache": "^1.0 || ^2.0"
+%global psr_cache_min_ver 1.0
+%global psr_cache_max_ver 3.0
+
# "php": "~7.1 || ^8.0"
%global php_min_ver 7.1
@@ -37,14 +48,14 @@ URL: https://github.com/%{github_owner}/%{github_name}
# GitHub export does not include tests.
# Run php-doctrine-cache-get-source.sh to create full source.
Source0: %{name}-%{version}-%{github_commit}.tar.gz
-Source1: %{name}-get-source.sh
+Source9: %{name}-get-source.sh
BuildArch: noarch
# Tests
%if %{with tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: phpunit7
+BuildRequires: phpunit9
## phpcompatinfo (computed from version 1.7.1)
BuildRequires: php-date
BuildRequires: php-hash
@@ -54,6 +65,16 @@ BuildRequires: php-spl
BuildRequires: php-sqlite3
## Autoloader
BuildRequires: php-composer(fedora/autoloader)
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires:(php-composer(symfony/cache) >= %{symfony_min_ver} with php-composer(symfony/cache) < %{symfony_max_ver})
+BuildRequires:(php-composer(psr/cache) >= %{psr_cache_min_ver} with php-composer(psr/cache) < %{psr_cache_max_ver})
+# remirepo:4
+%else
+BuildRequires: php-symfony4-cache >= %{symfony_min_ver}
+BuildRequires: php-psr-cache >= %{psr_cache_min_ver}
+%endif
+BuildRequires: php-composer(cache/integration-tests) >= %{cache_integration_tests_min_ver}
%endif
# composer.json
@@ -133,6 +154,16 @@ cat <<'BOOTSTRAP' | tee bootstrap.php
<?php
require_once '%{buildroot}%{phpdir}/Doctrine/Common/Cache/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Tests\\', __DIR__.'/tests/Doctrine/Tests');
+\Fedora\Autoloader\Dependencies::required([
+ '%{phpdir}/Cache/IntegrationTests/autoload.php',
+ [
+ '%{phpdir}/Psr/Cache2/autoload.php',
+ '%{phpdir}/Psr/Cache/autoload.php',
+ ], [
+ '%{phpdir}/Symfony5/Component/Cache/autoload.php',
+ '%{phpdir}/Symfony4/Component/Cache/autoload.php',
+ ],
+]);
BOOTSTRAP
: Skip tests known to fail
@@ -140,6 +171,7 @@ rm -f tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php
: Skip tests requiring a server to connect to
rm -f \
+ tests/Doctrine/Tests/Common/Cache/Psr6/CacheAdapterTest.php \
tests/Doctrine/Tests/Common/Cache/CouchbaseCacheTest.php \
tests/Doctrine/Tests/Common/Cache/CouchbaseBucketCacheTest.php \
tests/Doctrine/Tests/Common/Cache/ExtMongoDBCacheTest.php \
@@ -152,9 +184,9 @@ rm -f \
: Upstream tests
RETURN_CODE=0
-for PHP_EXEC in "" php72 php73 php74; do
+for PHP_EXEC in "" php73 php74 php80; do
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
- $PHP_EXEC %{_bindir}/phpunit7 --bootstrap bootstrap.php \
+ $PHP_EXEC %{_bindir}/phpunit9 --bootstrap bootstrap.php \
--verbose || RETURN_CODE=1
fi
done
@@ -175,6 +207,14 @@ exit $RETURN_CODE
%changelog
+* Wed May 19 2021 Remi Collet <remi@remirepo.net> - 1.11.1-1
+- update to 1.11.1
+
+* Fri Apr 23 2021 Remi Collet <remi@remirepo.net> - 1.11.0-1
+- update to 1.11.0
+- switch to phpunit9
+- add build dependency on psr/cache, symfony/cache and cache/integration-tests
+
* Wed Jul 8 2020 Remi Collet <remi@remirepo.net> - 1.10.2-1
- update to 1.10.2