From 88202115379ed569f5be0416fcc96f5593ad097f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 21 Dec 2020 08:49:17 +0100 Subject: update to 1.12.2 switch to phpunit9 --- php-phpspec-prophecy.spec | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'php-phpspec-prophecy.spec') diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index a6574bc..24dec2b 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 8ce87516be71aae9b956f81906aaf0338e0d8a2d +%global gh_commit 245710e971a030f42e08f4912863805570f23d39 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project prophecy @@ -19,7 +19,7 @@ %endif Name: php-phpspec-prophecy -Version: 1.12.1 +Version: 1.12.2 Release: 1%{?dist} Summary: Highly opinionated mocking framework for PHP @@ -46,9 +46,14 @@ BuildRequires: php-doctrine-instantiator >= 1.2 %endif # from composer.json, "require-dev": { # "phpspec/phpspec": "^6.0" -# "phpunit/phpunit": "^8.0 || ^9.0 <9.3" +# "phpunit/phpunit": "^8.0 || ^9.0" BuildRequires: php-composer(phpspec/phpspec) >= 6.0 -BuildRequires: phpunit8 +%if 0%{?fedora} >= 32 || 0%{?rhel} >=9 +%global phpunit %{_bindir}/phpunit9 +%else +%global phpunit %{_bindir}/phpunit8 +%endif +BuildRequires: %{phpunit} %endif # Autoloader BuildRequires: php-fedora-autoloader-devel @@ -144,13 +149,14 @@ php %{buildroot}%{_datadir}/php/Prophecy/autoload.php phpspec --version ret=0 -for cmd in php php72 php73 php74; do - if which $cmd; then - $cmd -d auto_prepend_file=vendor/autoload.php \ +for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do + if which $cmdarg; then + set $cmdarg + $1 -d auto_prepend_file=vendor/autoload.php \ %{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1 - $cmd -d auto_prepend_file=vendor/autoload.php \ - %{_bindir}/phpunit8 || ret=1 + $1 -d auto_prepend_file=vendor/autoload.php \ + ${2:-%{_bindir}/phpunit9}|| ret=1 fi done exit $ret @@ -169,6 +175,10 @@ exit $ret %changelog +* Mon Dec 21 2020 Remi Collet - 1.12.2-1 +- update to 1.12.2 +- switch to phpunit9 + * Tue Sep 29 2020 Remi Collet - 1.12.1-1 - update to 1.12.1 -- cgit