From 2b466ab6e69f07b19595ac914ad17e7e1aad440e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 12 Feb 2024 12:17:21 +0100 Subject: update to 2.10.0 (no change) raise dependency on php-mock-integration2 2.3 allow phpunit11 --- composer.json | 4 ++-- php-mock-phpunit2.spec | 38 ++++++++++++++++++++++++++------------ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 5c64c89..9218934 100644 --- a/composer.json +++ b/composer.json @@ -19,8 +19,8 @@ }, "require": { "php": ">=7", - "phpunit/phpunit": "^6 || ^7 || ^8 || ^9 || ^10.0.17", - "php-mock/php-mock-integration": "^2.2.1" + "phpunit/phpunit": "^6 || ^7 || ^8 || ^9 || ^10.0.17 || ^11", + "php-mock/php-mock-integration": "^2.3" }, "require-dev": { "mockery/mockery": "^1.3.6" diff --git a/php-mock-phpunit2.spec b/php-mock-phpunit2.spec index 9d560b9..95a7c11 100644 --- a/php-mock-phpunit2.spec +++ b/php-mock-phpunit2.spec @@ -1,20 +1,21 @@ # remirepo/fedora spec file for php-mock-phpunit2 # -# Copyright (c) 2016-2023 Remi Collet +# Copyright (c) 2016-2024 Remi Collet # License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit 3dabfd474d43da4d1d2fee5260c634457c5da344 +%global gh_commit e1f7e795990b00937376e345883ea68ca3bda7e0 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_date 2024-02-11 %global gh_owner php-mock %global gh_project php-mock-phpunit %global with_tests 0%{!?_without_tests:1} %global major 2 Name: php-mock-phpunit%{major} -Version: 2.9.0 +Version: 2.10.0 Release: 1%{?dist} Summary: Mock built-in PHP functions with PHPUnit. @@ -27,31 +28,28 @@ BuildRequires: php(language) >= 7 %if %{with_tests} # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(php-mock/php-mock-integration) >= 2.2.1 with php-composer(php-mock/php-mock-integration) < 3) +BuildRequires: (php-composer(php-mock/php-mock-integration) >= 2.3 with php-composer(php-mock/php-mock-integration) < 3) BuildRequires: (php-composer(php-mock/php-mock) >= 2.2 with php-composer(php-mock/php-mock) < 3) # From composer.json "require-dev": { # "mockery/mockery": "^1.3.6" BuildRequires: (php-composer(mockery/mockery) >= 1.3.6 with php-composer(mockery/mockery) < 2) # remirepo:5 %else -BuildRequires: php-mock-integration2 >= 2.2.1 +BuildRequires: php-mock-integration2 >= 2.3 BuildRequires: php-mock2 >= 2.2 BuildRequires: php-mockery >= 1.3.6 %endif BuildRequires: phpunit8 BuildRequires: phpunit9 -%if 0%{?fedora} >= 37 || 0%{?rhel} >= 10 BuildRequires: phpunit10 >= 10.0.17 -%else -BuildRequires: phpunit7 -%endif +# TODO phpunit11 but requires php 8.2 # For autoloader BuildRequires: php-composer(fedora/autoloader) %endif # from composer.json, "require": { # "php": ">=7", -# "phpunit/phpunit": "^6 || ^7 || ^8 || ^9 || ^10.0.17", +# "phpunit/phpunit": "^6 || ^7 || ^8 || ^9 || ^10.0.17 || ^11", # "php-mock/php-mock-integration": "^2.2.1" # "conflict": { # "phpunit/phpunit-mock-objects": "3.2.0" @@ -59,11 +57,11 @@ Requires: php(language) >= 7 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Recommends: (phpunit8 or phpunit9 or phpunit10) -Requires: (php-composer(php-mock/php-mock-integration) >= 2.2.1 with php-composer(php-mock/php-mock-integration) < 3) +Requires: (php-composer(php-mock/php-mock-integration) >= 2.3 with php-composer(php-mock/php-mock-integration) < 3) Requires: (php-composer(php-mock/php-mock) >= 2.2 with php-composer(php-mock/php-mock) < 3) # remirepo:4 %else -Requires: php-mock-integration2 >= 2.2.1 +Requires: php-mock-integration2 >= 2.3 Requires: php-mock2 >= 2.2 %endif # From phpcompatinfo report from version 2.1.0 @@ -157,6 +155,17 @@ for cmd in php php81 php82 php83; do fi done fi + +if [ -x %{_bindir}/phpunit11 ]; then +: Run upstream test suite with phpunit11 +for cmd in php php82 php83; do + if which $cmd; then + $cmd %{_bindir}/phpunit11 \ + --filter '^((?!(testPreserveArgumentDefaultValue)).)*$' \ + || ret=1 + fi +done +fi exit $ret %else : bootstrap build with test suite disabled @@ -173,6 +182,11 @@ exit $ret %changelog +* Mon Feb 12 2024 Remi Collet - 2.10.0-1 +- update to 2.10.0 (no change) +- raise dependency on php-mock-integration2 2.3 +- allow phpunit11 + * Mon Dec 4 2023 Remi Collet - 2.9.0-1 - update to 2.9.0 -- cgit