diff options
Diffstat (limited to 'php-doctrine-cache.spec')
-rw-r--r-- | php-doctrine-cache.spec | 34 |
1 files changed, 24 insertions, 10 deletions
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) |