diff options
-rw-r--r-- | composer.json | 14 | ||||
-rw-r--r-- | php-doctrine-cache.spec | 86 |
2 files changed, 85 insertions, 15 deletions
diff --git a/composer.json b/composer.json index b889aa3..bd337f9 100644 --- a/composer.json +++ b/composer.json @@ -28,9 +28,13 @@ "require-dev": { "alcaeus/mongo-php-adapter": "^1.1", "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^7.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", "predis/predis": "~1.0", - "doctrine/coding-standard": "^6.0" + "doctrine/coding-standard": "^9", + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "cache/integration-tests": "dev-master", + "symfony/cache": "^4.4 || ^5.4 || ^6", + "symfony/var-exporter": "^4.4 || ^5.4 || ^6" }, "suggest": { "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" @@ -44,9 +48,9 @@ "autoload-dev": { "psr-4": { "Doctrine\\Tests\\": "tests/Doctrine/Tests" } }, - "extra": { - "branch-alias": { - "dev-master": "1.9.x-dev" + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/php-doctrine-cache.spec b/php-doctrine-cache.spec index 8a33b37..bb41be3 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,17 +12,29 @@ %global github_owner doctrine %global github_name cache -%global github_version 1.10.1 -%global github_commit 35a4a70cd94e09e2259dfae7488afc6b474ecbd3 +%global github_version 1.13.0 +%global github_commit 56cd022adb5514472cb144c087393c1821911d09 %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.4 || ^6", +# "symfony/var-exporter": "^4.4 || ^5.4 || ^6" +%global symfony_min_ver 4.4 +%global symfony_max_ver 7 + +# "psr/cache": "^1.0 || ^2.0 || ^3.0" +%global psr_cache_min_ver 1.0 +%global psr_cache_max_ver 4 + # "php": "~7.1 || ^8.0" %global php_min_ver 7.1 # Build using "--without tests" to disable tests -%global with_tests 0%{!?_without_tests:1} +%bcond_without tests %{!?phpdir: %global phpdir %{_datadir}/php} @@ -37,14 +49,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} +%if %{with tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: phpunit7 +BuildRequires: phpunit9 >= 9.5 ## phpcompatinfo (computed from version 1.7.1) BuildRequires: php-date BuildRequires: php-hash @@ -54,6 +66,18 @@ 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(symfony/var-exporter) >= %{symfony_min_ver} with php-composer(symfony/var-exporter) < %{symfony_max_ver}) +BuildRequires:(php-composer(psr/cache) >= %{psr_cache_min_ver} with php-composer(psr/cache) < %{psr_cache_max_ver}) +# remirepo:5 +%else +BuildRequires: php-symfony4-cache >= %{symfony_min_ver} +BuildRequires: php-symfony4-var-exporter >= %{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 @@ -127,12 +151,28 @@ cp -rp lib/Doctrine/Common/Cache %{buildroot}%{phpdir}/Doctrine/Common/ %check -%if %{with_tests} +%if %{with tests} : Create tests bootstrap 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/Cache3/autoload.php', + '%{phpdir}/Psr/Cache2/autoload.php', + '%{phpdir}/Psr/Cache/autoload.php', + ], [ + '%{phpdir}/Symfony6/Component/Cache/autoload.php', + '%{phpdir}/Symfony5/Component/Cache/autoload.php', + '%{phpdir}/Symfony4/Component/Cache/autoload.php', + ], [ + '%{phpdir}/Symfony6/Component/VarExporter/autoload.php', + '%{phpdir}/Symfony5/Component/VarExporter/autoload.php', + '%{phpdir}/Symfony4/Component/VarExporter/autoload.php', + ], +]); BOOTSTRAP : Skip tests known to fail @@ -140,6 +180,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 +193,9 @@ rm -f \ : Upstream tests RETURN_CODE=0 -for PHP_EXEC in "" php72 php73 php74; do +for PHP_EXEC in "" php74 php80 php81 php82; 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 +216,31 @@ exit $RETURN_CODE %changelog +* Mon May 23 2022 Remi Collet <remi@remirepo.net> - 1.13.0-1 +- update to 1.13.0 + +* Mon Jul 19 2021 Remi Collet <remi@remirepo.net> - 1.12.1-1 +- update to 1.12.1 +- allow psr/cache v3 +- allow Symfony v6 + +* Tue May 25 2021 Remi Collet <remi@remirepo.net> - 1.11.3-1 +- update to 1.11.3 + +* Tue May 25 2021 Remi Collet <remi@remirepo.net> - 1.11.2-1 +- update to 1.11.2 + +* 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 + * Thu May 28 2020 Remi Collet <remi@remirepo.net> - 1.10.1-1 - update to 1.10.1 (no change) |