summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json15
-rw-r--r--php-doctrine-cache.spec54
2 files changed, 54 insertions, 15 deletions
diff --git a/composer.json b/composer.json
index b889aa3..c38d062 100644
--- a/composer.json
+++ b/composer.json
@@ -28,25 +28,24 @@
"require-dev": {
"alcaeus/mongo-php-adapter": "^1.1",
"mongodb/mongodb": "^1.1",
- "phpunit/phpunit": "^7.0",
+ "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"predis/predis": "~1.0",
- "doctrine/coding-standard": "^6.0"
+ "doctrine/coding-standard": "^8.0",
+ "psr/cache": "^1.0 || ^2.0",
+ "cache/integration-tests": "dev-master",
+ "symfony/cache": "^4.4 || ^5.2"
},
"suggest": {
"alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver"
},
"conflict": {
- "doctrine/common": ">2.2,<2.4"
+ "doctrine/common": ">2.2,<2.4",
+ "psr/cache": ">=3"
},
"autoload": {
"psr-4": { "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" }
},
"autoload-dev": {
"psr-4": { "Doctrine\\Tests\\": "tests/Doctrine/Tests" }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.9.x-dev"
- }
}
}
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