From c41f21ed54f658390ccfe5ec0389a7d8acc9aca7 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 1 Mar 2024 16:09:33 +0100 Subject: update to 2.2.0 allow phpunit11 --- composer.json | 6 ++---- php-phpspec-prophecy-phpunit.spec | 25 ++++++++++++++++++++----- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 83a8818..a27bf91 100644 --- a/composer.json +++ b/composer.json @@ -11,12 +11,10 @@ "email": "stof@notk.org" } ], - "minimum-stability": "dev", - "prefer-stable": true, "require": { "php": "^7.3 || ^8", "phpspec/prophecy": "^1.18", - "phpunit/phpunit":"^9.1 || ^10.1" + "phpunit/phpunit":"^9.1 || ^10.1 || ^11.0" }, "autoload": { "psr-4": { @@ -31,7 +29,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.x-dev" } } } diff --git a/php-phpspec-prophecy-phpunit.spec b/php-phpspec-prophecy-phpunit.spec index c2697fb..835cc56 100644 --- a/php-phpspec-prophecy-phpunit.spec +++ b/php-phpspec-prophecy-phpunit.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-phpspec-prophecy-phpunit # -# Copyright (c) 2020-2023 Remi Collet +# Copyright (c) 2020-2024 Remi Collet # License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -9,13 +9,13 @@ %bcond_without tests -%global gh_commit 29f8114c2c319a4308e6b070902211e062efa392 +%global gh_commit 16e1247e139434bce0bac09848bc5c8d882940fc %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project prophecy-phpunit Name: php-%{gh_owner}-%{gh_project} -Version: 2.1.0 +Version: 2.2.0 Release: 1%{?dist} Summary: Integrating the Prophecy mocking library in PHPUnit test cases @@ -34,6 +34,10 @@ BuildRequires: (php-composer(phpspec/prophecy) >= 1.18 with php-composer(phpspe %else BuildRequires: php-phpspec-prophecy >= 1.18 %endif +# remirepo:3 +%if 0%{?fedora} >= 38 || 0%{?rhel} >= 10 +BuildRequires: phpunit11 >= 11.0 +%endif BuildRequires: phpunit10 >= 10.1 BuildRequires: phpunit9 >= 9.1 %endif @@ -43,12 +47,12 @@ BuildRequires: php-fedora-autoloader-devel # from composer.json, "requires": { # "php": "^7.3 || ^8", # "phpspec/prophecy": "^1.18", -# "phpunit/phpunit":"^9.1" +# "phpunit/phpunit":"^9.1 || ^10.1 || ^11.0" Requires: php(language) >= 7.3 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(phpspec/prophecy) >= 1.18 with php-composer(phpspec/prophecy) < 2) -Requires: (phpunit9 >= 9.1 or phpunit10 >= 10.1) +Requires: (phpunit9 >= 9.1 or phpunit10 >= 10.1 or phpunit11 >= 11.0) # remirepo:4 %else Requires: php-phpspec-prophecy >= 1.18 @@ -118,6 +122,13 @@ for cmd in php php81 php82 php83; do %{_bindir}/phpunit10 --no-coverage|| ret=1 fi done +for cmd in php php82 php83; do + if which %{_bindir}/phpunit11 && which $cmd; then + sed -e 's/@PHPUNIT@/PHPUnit11/' vendor/autoload.php.in > vendor/autoload.php + $cmd -d auto_prepend_file=vendor/autoload.php \ + %{_bindir}/phpunit11 --no-coverage|| ret=1 + fi +done exit $ret %else : Test suite disabled @@ -134,6 +145,10 @@ exit $ret %changelog +* Fri Mar 1 2024 Remi Collet - 2.2.0-1 +- update to 2.2.0 +- allow phpunit11 + * Mon Dec 11 2023 Remi Collet - 2.1.0-1 - update to 2.1.0 - raise dependency on phpspec/prophecy 1.18 -- cgit