summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-10-17 13:33:18 +0200
committerRemi Collet <remi@remirepo.net>2018-10-17 13:33:18 +0200
commit31f9a96ff4bc368af0b976f8074d09098e759b4f (patch)
tree267d28988882e5c72008265c947fed0104164841
parent6062ec43eb88e47e5144e45ce50929c4dce92ddc (diff)
update to 1.8.0
manage optional dependencies in autoloader switch to phpunit7
-rw-r--r--composer.json9
-rw-r--r--php-doctrine-cache.spec34
2 files changed, 29 insertions, 14 deletions
diff --git a/composer.json b/composer.json
index 893012e..2ee5d25 100644
--- a/composer.json
+++ b/composer.json
@@ -3,7 +3,7 @@
"type": "library",
"description": "Caching library offering an object-oriented API for many cache backends",
"keywords": ["cache", "caching"],
- "homepage": "http://www.doctrine-project.org",
+ "homepage": "https://www.doctrine-project.org",
"license": "MIT",
"authors": [
{"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"},
@@ -18,8 +18,9 @@
"require-dev": {
"alcaeus/mongo-php-adapter": "^1.1",
"mongodb/mongodb": "^1.1",
- "phpunit/phpunit": "^5.7",
- "predis/predis": "~1.0"
+ "phpunit/phpunit": "^7.0",
+ "predis/predis": "~1.0",
+ "doctrine/coding-standard": "^4.0"
},
"suggest": {
"alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver"
@@ -35,7 +36,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "1.7.x-dev"
+ "dev-master": "1.8.x-dev"
}
}
}
diff --git a/php-doctrine-cache.spec b/php-doctrine-cache.spec
index 3581e74..9ee8d5c 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-2017 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Copyright (c) 2013-2018 Shawn Iwinski <shawn.iwinski@gmail.com>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,8 +12,8 @@
%global github_owner doctrine
%global github_name cache
-%global github_version 1.7.1
-%global github_commit b3217d58609e9c8e661cd41357a54d926c4a2a1a
+%global github_version 1.8.0
+%global github_commit d768d58baee9a4862ca783840eca1b9add7a7f57
%global composer_vendor doctrine
%global composer_project cache
@@ -45,7 +45,7 @@ BuildArch: noarch
%if %{with_tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: php-composer(phpunit/phpunit)
+BuildRequires: phpunit7
## phpcompatinfo (computed from version 1.7.1)
BuildRequires: php-date
BuildRequires: php-hash
@@ -66,7 +66,9 @@ Requires: php-spl
# Autoloader
Requires: php-composer(fedora/autoloader)
# Weak dependencies
-%if 0%{?fedora} > 21
+%if 0%{?fedora} > 21 || 0%{?rhel} >= 8
+Suggests: php-composer(alcaeus/mongo-php-adapter)
+Suggests: php-composer(mongodb/mongodb)
Suggests: php-composer(predis/predis)
Suggests: php-pecl(apcu)
Suggests: php-pecl(igbinary)
@@ -74,7 +76,6 @@ Suggests: php-pecl(memcache)
Suggests: php-pecl(memcached)
Suggests: php-pecl(mongo)
Suggests: php-pecl(redis)
-Suggests: php-xcache
%endif
# Composer
@@ -106,6 +107,14 @@ cat <<'AUTOLOAD' | tee lib/Doctrine/Common/Cache/autoload.php
require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Common\\Cache\\', __DIR__);
+\Fedora\Autoloader\Dependencies::optional([
+ '/usr/share/php/Alcaeus/MongoDbAdapter/autoload.php',
+ '/usr/share/php/MongoDB/autoload.php',
+ '/usr/share/pear/Predis/Autoloader.php',
+]);
+if (class_exists("Predis\\Autoloader")) {
+ Predis\Autoloader::register();
+}
AUTOLOAD
@@ -133,6 +142,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/CouchbaseCacheTest.php \
+ tests/Doctrine/Tests/Common/Cache/CouchbaseBucketCacheTest.php \
tests/Doctrine/Tests/Common/Cache/ExtMongoDBCacheTest.php \
tests/Doctrine/Tests/Common/Cache/LegacyMongoDBCacheTest.php \
tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php \
@@ -143,11 +153,10 @@ rm -f \
: Upstream tests
RETURN_CODE=0
-PHPUNIT=$(which phpunit)
-for PHP_EXEC in "" php72; do
+for PHP_EXEC in "" php71 php72 php73; do
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
- $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
- || RETURN_CODE=1
+ $PHP_EXEC %{_bindir}/phpunit7 --bootstrap bootstrap.php \
+ --verbose || RETURN_CODE=1
fi
done
exit $RETURN_CODE
@@ -167,6 +176,11 @@ exit $RETURN_CODE
%changelog
+* Wed Oct 17 2018 Remi Collet <remi@remirepo.net> - 1.8.0-1
+- update to 1.8.0
+- manage optional dependencies in autoloader
+- switch to phpunit7
+
* Sun Sep 10 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.7.1-1
- Update to 1.7.1 (RHBZ #1485327)