From 141e1ba420e8477405788e749acf81fe5915f71f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 25 Nov 2020 16:29:24 +0100 Subject: update to 1.8.0 raise dependency on mongodb extension 1.8.1 add dependency on symfony/polyfill-php80 --- php-mongodb.spec | 64 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 51 insertions(+), 13 deletions(-) (limited to 'php-mongodb.spec') diff --git a/php-mongodb.spec b/php-mongodb.spec index a4481ee..18b4811 100644 --- a/php-mongodb.spec +++ b/php-mongodb.spec @@ -9,7 +9,7 @@ # disabled for https://fedoraproject.org/wiki/Changes/MongoDB_Removal %bcond_with tests -%global gh_commit 38b685191c047a57275d6ccd2ea5c50f23638485 +%global gh_commit 953dbc19443aa9314c44b7217a16873347e6840d %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner mongodb #global gh_date 20151102 @@ -18,7 +18,7 @@ #global prever beta2 Name: php-%{gh_owner} -Version: 1.7.2 +Version: 1.8.0 %if 0%{?gh_date} Release: 1%{gh_date}git%{gh_short}%{?dist} %else @@ -30,43 +30,65 @@ License: ASL 2.0 URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}%{?prever}-%{?gh_short}.tar.gz -# Autoloader -Source1: %{name}-autoload.php # Get rid of jean85/pretty-package-versions Patch0: %{name}-rpm.patch BuildArch: noarch BuildRequires: php(language) >= 7.0 BuildRequires: php-cli +BuildRequires: php-reflection BuildRequires: php-date +BuildRequires: php-dom BuildRequires: php-hash BuildRequires: php-json BuildRequires: php-spl -BuildRequires: php-pecl(mongodb) >= 1.8 +BuildRequires: php-pecl(mongodb) >= 1.8.1 +# remirepo:1 +%if 0%{?fedora} >= 31 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(symfony/polyfill-php80) >= 1.19 with php-composer(symfony/polyfill-php80) < 2) +# remirepo:4 +%else +BuildRequires: php-symfony-polyfill < 2 +BuildRequires: php-symfony-polyfill >= 1.19 +%endif %if %{with tests} BuildRequires: mongodb-server >= 2.4 # From composer.json, "require-dev": { # "phpunit/phpunit": "^6.4 || ^8.3", # "sebastian/comparator": "^2.0 || ^3.0", # "squizlabs/php_codesniffer": "^3.5, <3.5.5", -# "symfony/phpunit-bridge": "^4.4@dev" +# "symfony/phpunit-bridge": "^5.x@dev" +%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 +%global phpunit %{_bindir}/phpunit9 +%else %global phpunit %{_bindir}/phpunit8 +%endif BuildRequires: %{phpunit} %endif # For autoloader BuildRequires: php-composer(fedora/autoloader) # From composer.json, "require": { -# "php": "^7.0" +# "php": "^7.0 || ^8.0" # "ext-hash": "*", # "ext-json": "*", -# "ext-mongodb": "^1.7" +# "ext-mongodb": "^1.8.1" # "jean85/pretty-package-versions": "^1.2" +# "symfony/polyfill-php80": "^1.19" Requires: php(language) >= 7.0 Requires: php-hash Requires: php-json -Requires: php-pecl(mongodb) >= 1.8 -# From phpcompatinfo report for 1.5.0 +Requires: php-pecl(mongodb) >= 1.8.1 +# remirepo:1 +%if 0%{?fedora} >= 31 || 0%{?rhel} >= 8 +Requires: (php-composer(symfony/polyfill-php80) >= 1.19 with php-composer(symfony/polyfill-php80) < 2) +# remirepo:4 +%else +Requires: php-symfony-polyfill < 2 +Requires: php-symfony-polyfill >= 1.19 +%endif +# From phpcompatinfo report for 1.8.0 +Requires: php-reflection Requires: php-date Requires: php-spl # For autoloader @@ -92,7 +114,17 @@ Autoloader: %{_datadir}/php/%{psr0}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} -cp %{SOURCE1} src/autoload.php +cat << 'EOF' | tee src/autoload.php + - 1.8.0-1 +- update to 1.8.0 +- raise dependency on mongodb extension 1.8.1 +- add dependency on symfony/polyfill-php80 + * Fri Nov 6 2020 Remi Collet - 1.7.2-1 - update to 1.7.2 -- cgit