summaryrefslogtreecommitdiffstats
path: root/php-doctrine-doctrine-cache-bundle.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-doctrine-doctrine-cache-bundle.spec')
-rw-r--r--php-doctrine-doctrine-cache-bundle.spec127
1 files changed, 57 insertions, 70 deletions
diff --git a/php-doctrine-doctrine-cache-bundle.spec b/php-doctrine-doctrine-cache-bundle.spec
index 758074d..be35218 100644
--- a/php-doctrine-doctrine-cache-bundle.spec
+++ b/php-doctrine-doctrine-cache-bundle.spec
@@ -12,32 +12,31 @@
%global github_owner doctrine
%global github_name DoctrineCacheBundle
-%global github_version 1.3.5
-%global github_commit 5514c90d9fb595e1095e6d66ebb98ce9ef049927
+%global github_version 1.4.0
+%global github_commit 6bee2f9b339847e8a984427353670bad4e7bdccb
%global github_short %(c=%{github_commit}; echo ${c:0:7})
%global composer_vendor doctrine
%global composer_project doctrine-cache-bundle
-# "php": ">=5.3.2"
-%global php_min_ver 5.3.2
+# "php": ">=7.1"
+%global php_min_ver 7.1
# "doctrine/cache": "^1.4.2"
%global cache_min_ver 1.4.2
%global cache_max_ver 2.0
-# "doctrine/inflector": "~1.0"
+# "doctrine/inflector": "^1.0"
%global inflector_min_ver 1.0
%global inflector_max_ver 2.0
-# "symfony/doctrine-bridge": "~2.7|~3.3|~4.0"
-# "symfony/yaml": "~2.7|~3.3|~4.0",
-# "symfony/validator": "~2.7|~3.3|~4.0",
-# "symfony/console": "~2.7|~3.3|~4.0",
-# "symfony/finder": "~2.7|~3.3|~4.0",
-# "symfony/framework-bundle": "~2.7|~3.3|~4.0",
-# NOTE: Min version not 2.3 because autoloader required
-%global symfony_min_ver 2.7.1
+# "symfony/doctrine-bridge": "^3.4|^4.0"
+# "symfony/yaml": "^3.4|^4.0",
+# "symfony/validator": "^3.4|^4.0",
+# "symfony/console": "^3.4|^4.0",
+# "symfony/finder": "^3.4|^4.0",
+# "symfony/framework-bundle": "^3.4|^4.0",
+%global symfony_min_ver 3.4
%global symfony_max_ver 5
-# "symfony/security-acl": "~2.3|~3.0",
-%global secacl_min_ver 2.2
+# "symfony/security-acl": "~2.8|~3.3",
+%global secacl_min_ver 2.8
%global secacl_max_ver 4
# Build using "--without tests" to disable tests
@@ -61,38 +60,27 @@ BuildArch: noarch
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
%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/inflector) >= %{inflector_min_ver} with php-composer(doctrine/inflector) < %{inflector_max_ver})
+BuildRequires:(php-composer(doctrine/cache) >= %{cache_min_ver} with php-composer(doctrine/cache) < %{cache_max_ver})
+BuildRequires:(php-composer(doctrine/inflector) >= %{inflector_min_ver} with php-composer(doctrine/inflector) < %{inflector_max_ver})
+BuildRequires:(php-composer(symfony/security-acl) >= %{secacl_min_ver} with php-composer(symfony/security-acl) < %{secacl_max_ver})
+%else
+BuildRequires: php-composer(doctrine/cache) < %{cache_max_ver}
+BuildRequires: php-composer(doctrine/cache) >= %{cache_min_ver}
+BuildRequires: php-composer(doctrine/inflector) < %{inflector_max_ver}
+BuildRequires: php-composer(doctrine/inflector) >= %{inflector_min_ver}
+BuildRequires: php-composer(symfony/security-acl) < %{secacl_max_ver}
+BuildRequires: php-composer(symfony/security-acl) >= %{secacl_min_ver}
+%endif
# ensure we use same version of all components
BuildRequires: php-symfony4-console
BuildRequires: php-symfony4-doctrine-bridge
BuildRequires: php-symfony4-finder
BuildRequires: php-symfony4-framework-bundle
+BuildRequires: php-symfony4-security
BuildRequires: php-symfony4-validator
BuildRequires: php-symfony4-yaml
BuildRequires: phpunit7
%global phpunit %{_bindir}/phpunit7
-%else
-BuildRequires: php-composer(doctrine/cache) < %{cache_max_ver}
-BuildRequires: php-composer(doctrine/cache) >= %{cache_min_ver}
-BuildRequires: php-composer(doctrine/inflector) < %{inflector_max_ver}
-BuildRequires: php-composer(doctrine/inflector) >= %{inflector_min_ver}
-BuildRequires: php-symfony-console
-BuildRequires: php-symfony-doctrine-bridge
-BuildRequires: php-symfony-finder
-BuildRequires: php-symfony-framework-bundle
-BuildRequires: php-symfony-validator
-BuildRequires: php-symfony-yaml
-BuildRequires: php-composer(phpunit/phpunit)
-%global phpunit %{_bindir}/phpunit
-%endif
-%if 0
-BuildRequires: php-composer(symfony/security) < %{symfony_max_ver}
-BuildRequires: php-composer(symfony/security) >= %{symfony_min_ver}
-%else
-BuildRequires: php-composer(symfony/security-acl) < %{secacl_max_ver}
-BuildRequires: php-composer(symfony/security-acl) >= %{secacl_min_ver}
-%endif
## phpcompatinfo (computed from version 1.3.4)
BuildRequires: php-hash
BuildRequires: php-reflection
@@ -154,22 +142,18 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Bundle\\DoctrineCacheBundle\\', __DIR__);
-\Fedora\Autoloader\Dependencies::required(array(
+\Fedora\Autoloader\Dependencies::required([
'%{phpdir}/Doctrine/Common/Cache/autoload.php',
'%{phpdir}/Doctrine/Common/Inflector/autoload.php',
- array(
+ [
(getenv('RPM_SYMFONY_TREE')?:'%{phpdir}/Symfony4') . '/Bridge/Doctrine/autoload.php',
'%{phpdir}/Symfony3/Bridge/Doctrine/autoload.php',
- '%{phpdir}/Symfony/Bridge/Doctrine/autoload.php',
- ),
-));
-
-\Fedora\Autoloader\Dependencies::optional(array(
- array(
- (getenv('RPM_SYMFONY_TREE')?:'%{phpdir}/Symfony3') . '/Component/Security/autoload.php',
- '%{phpdir}/Symfony/Component/Security/autoload.php',
- ),
-));
+ ],
+]);
+
+\Fedora\Autoloader\Dependencies::optional([
+ '%{phpdir}/Symfony/Component/Security/Acl/autoload.php',
+]);
AUTOLOAD
@@ -186,33 +170,24 @@ cat <<'BOOTSTRAP' | tee bootstrap.php
<?php
require_once '%{buildroot}%{phpdir}/Doctrine/Bundle/DoctrineCacheBundle/autoload.php';
-\Fedora\Autoloader\Dependencies::required(array(
- array(
+\Fedora\Autoloader\Dependencies::required([
+ [
'%{phpdir}/Symfony4/Bundle/FrameworkBundle/autoload.php',
'%{phpdir}/Symfony3/Bundle/FrameworkBundle/autoload.php',
- '%{phpdir}/Symfony/Bundle/FrameworkBundle/autoload.php',
- ),
- array(
+ ], [
'%{phpdir}/Symfony4/Component/Console/autoload.php',
'%{phpdir}/Symfony3/Component/Console/autoload.php',
- '%{phpdir}/Symfony/Component/Console/autoload.php',
- ),
- array(
+ ], [
'%{phpdir}/Symfony4/Component/Finder/autoload.php',
'%{phpdir}/Symfony3/Component/Finder/autoload.php',
- '%{phpdir}/Symfony/Component/Finder/autoload.php',
- ),
- array(
+ ], [
'%{phpdir}/Symfony4/Component/Validator/autoload.php',
'%{phpdir}/Symfony3/Component/Validator/autoload.php',
- '%{phpdir}/Symfony/Component/Validator/autoload.php',
- ),
- array(
+ ], [
'%{phpdir}/Symfony4/Component/Yaml/autoload.php',
'%{phpdir}/Symfony3/Component/Yaml/autoload.php',
- '%{phpdir}/Symfony/Component/Yaml/autoload.php',
- ),
-));
+ ],
+]);
BOOTSTRAP
: Modify PHPUnit config
@@ -224,7 +199,13 @@ sed -e 's#\./#%{buildroot}%{phpdir}/Doctrine/Bundle/DoctrineCacheBundle/#g' \
pushd %{buildroot}%{phpdir}/Doctrine/Bundle/DoctrineCacheBundle/Tests
rm -f \
Functional/Fixtures/config/predis.xml \
- Functional/PredisCacheTest.php
+ Functional/MemcacheCacheTest.php \
+ Functional/MemcachedCacheTest.php \
+ Functional/MongoDBCacheTest.php \
+ Functional/PredisCacheTest.php \
+ Functional/RedisCacheTest.php \
+ Functional/RiakCacheTest.php
+
popd
: Upstream tests
@@ -232,8 +213,9 @@ RETURN_CODE=0
for cmdarg in "php %{phpunit}" php71 php72 php73; do
if which $cmdarg; then
set $cmdarg
- $1 ${2:-%{_bindir}/phpunit7} --verbose --bootstrap bootstrap.php \
- || RETURN_CODE=1
+ $1 ${2:-%{_bindir}/phpunit7} \
+ --bootstrap bootstrap.php \
+ --verbose || RETURN_CODE=1
fi
done
exit $RETURN_CODE
@@ -253,6 +235,11 @@ exit $RETURN_CODE
%changelog
+* Mon Dec 2 2019 Remi Collet <remi@remirepo.net> - 1.4.0-1
+- update to 1.4.0
+- raise dependency on PHP 7.1
+- drop support for Symfony 2
+
* Fri Nov 9 2018 Remi Collet <remi@remirepo.net> - 1.3.5-1
- update to 1.3.5