From ef4b4cf7b1d26a6836c56e02185247d167af0b9b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 29 Oct 2020 14:40:03 +0100 Subject: update to 1.4.2 raise dependency on PHP 7.3 drop compatibility with old phpunit 5, 6 and 7 --- php-mockery.spec | 52 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 22 deletions(-) (limited to 'php-mockery.spec') diff --git a/php-mockery.spec b/php-mockery.spec index 0579ca0..f7dc646 100644 --- a/php-mockery.spec +++ b/php-mockery.spec @@ -7,16 +7,17 @@ # # Please preserve changelog entries # -%global gh_commit 60fa2f67f6e4d3634bb4a45ff3171fa52215800d +%bcond_without tests + +%global gh_commit 20cab678faed06fac225193be281ea0fddb43b93 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner mockery %global gh_project mockery %global ns_project Mockery %global major 1 -%global with_tests 0%{!?_without_tests:1} Name: php-mockery -Version: 1.3.3 +Version: 1.4.2 Release: 1%{?dist} Summary: Mockery is a simple but flexible PHP mock object framework @@ -29,38 +30,40 @@ Source1: makesrc.sh Patch0: %{gh_project}-tests.patch BuildArch: noarch -%if %{with_tests} -BuildRequires: php(language) >= 5.6.0 +%if %{with tests} +BuildRequires: php(language) >= 7.3 # From composer.json, "require-dev": { -# "phpunit/phpunit": "^5.7.10|^6.5|^7.5|^8.5|^9.3" -# remirepo:1 -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +# "phpunit/phpunit": "^8.5|^9.3" +%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9 %global phpunit %{_bindir}/phpunit9 BuildRequires: phpunit9 >= 9.3 -BuildRequires: (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 3) -# remirepo:5 -%else +%endif %global phpunit %{_bindir}/phpunit8 BuildRequires: phpunit8 >= 8.5 -BuildRequires: php-hamcrest2 >= 2.0.1 +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 3) +# remirepo:3 +%else +BuildRequires: php-hamcrest2 >= 2.0.1 %endif # Autoloader %endif BuildRequires: php-fedora-autoloader-devel # From composer.json, "require": { -# "php": ">=5.6.0", +# "php": "^7.3 || ^8.0", # "lib-pcre": ">=7.0", # "hamcrest/hamcrest-php": "~2.0" -Requires: php(language) >= 5.6.0 +Requires: php(language) >= 7.3 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 3) +Requires: (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 3) # remirepo:3 %else -Requires: php-hamcrest2 >= 2.0.1 +Requires: php-hamcrest2 >= 2.0.1 %endif -# From phpcompatinfo report for version 1.0 +# From phpcompatinfo report for version 1.4.2 Requires: php-pcre Requires: php-spl Requires: php-reflection @@ -106,7 +109,7 @@ cp -rp library/%{ns_project} %{buildroot}/%{_datadir}/php/%{ns_project}%{major} %check -%if %{with_tests} +%if %{with tests} : Use installed tree and our autoloader export COMPOSER_VENDOR_DIR=%{buildroot}%{_datadir}/php/%{ns_project}%{major} @@ -114,13 +117,13 @@ phpab --output tests/classmap.php --exclude */SemiReservedWordsAsMethods.php tes : Run upstream test suite ret=0 -for cmd in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do +for cmd in "php %{phpunit}" php73 php74 php80; do if which $cmd; then set $cmd # see .travis.yml - if [ $($1 -r 'echo PHP_MAJOR_VERSION;') -lt 7 ] - then SUITE="Mockery Test Suite PHP56" - else SUITE="Mockery Test Suite" + if [ $($1 -r 'echo PHP_MAJOR_VERSION;') -lt 8 ] + then SUITE="Mockery Test Suite PHP7" + else SUITE="Mockery Test Suite PHP8" fi $1 ${2:-%{_bindir}/phpunit9} \ --no-coverage \ @@ -141,6 +144,11 @@ exit $ret %changelog +* Mon Oct 12 2020 Remi Collet - 1.4.2-1 +- update to 1.4.2 +- raise dependency on PHP 7.3 +- drop compatibility with old phpunit 5, 6 and 7 + * Mon Aug 17 2020 Remi Collet - 1.3.3-1 - update to 1.3.3 -- cgit