public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Remi Collet <remi@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/php-mock-phpunit2] rawhide: add upstream patches for PHPUnit 13.1
Date: Thu, 03 Sep 2026 07:49:01 GMT [thread overview]
Message-ID: <178842174157.1.7350085349331284559.rpms-php-mock-phpunit2-05d5ca5384ec@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/php-mock-phpunit2
Branch : rawhide
Commit : 05d5ca5384ec1d0ec49ff601560e24d2a46a20fe
Author : Remi Collet <remi@fedoraproject.org>
Date : 2026-09-03T09:48:55+02:00
Stats : +167/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/php-mock-phpunit2/c/05d5ca5384ec1d0ec49ff601560e24d2a46a20fe?branch=rawhide
Log:
add upstream patches for PHPUnit 13.1
fix FTBFS #2504405
---
diff --git a/php-mock-phpunit2.spec b/php-mock-phpunit2.spec
index f75e17a..cae0f62 100644
--- a/php-mock-phpunit2.spec
+++ b/php-mock-phpunit2.spec
@@ -16,13 +16,15 @@
Name: php-mock-phpunit%{major}
Version: 2.15.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Mock built-in PHP functions with PHPUnit.
License: WTFPL
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
+Patch0: upstream.patch
+
BuildArch: noarch
BuildRequires: php(language) >= 7
%if %{with_tests}
@@ -70,6 +72,7 @@ No further extension is needed.
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch -P0 -p1
: Create autoloader
cat << 'AUTOLOAD' | tee rpm.php
@@ -185,6 +188,10 @@ exit $ret
%changelog
+* Thu Sep 3 2026 Remi Collet <remi@remirepo.net> - 2.15.0-3
+- add upstream patches for PHPUnit 13.1
+- fix FTBFS #2504405
+
* Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.15.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
diff --git a/upstream.patch b/upstream.patch
new file mode 100644
index 0000000..bead2b4
--- /dev/null
+++ b/upstream.patch
@@ -0,0 +1,159 @@
+From 6032326b8be697b2a2c9a2fa0963514702a8f8a7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20Bundyra?= <contact@webimpress.com>
+Date: Mon, 9 Feb 2026 09:34:17 +0100
+Subject: [PATCH] fix: PHPUnit 13.0.1 tests (#94)
+
+As of https://github.com/sebastianbergmann/phpunit/releases/tag/13.0.1
+`InvocationHandler` returns now `InvocationStubber` for stubs instead of `InvocationMocker`
+
+See https://github.com/sebastianbergmann/phpunit/issues/6497
+---
+ tests/MockObjectProxyTest.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/MockObjectProxyTest.php b/tests/MockObjectProxyTest.php
+index 54c8c56..593b15c 100644
+--- a/tests/MockObjectProxyTest.php
++++ b/tests/MockObjectProxyTest.php
+@@ -60,7 +60,7 @@ public function testExpects()
+ if (class_exists(\PHPUnit\Runner\Version::class)
+ && version_compare(\PHPUnit\Runner\Version::id(), '8.4.0') >= 0
+ ) {
+- $invocationHandler = new InvocationHandler([$methods], false);
++ $invocationHandler = new InvocationHandler([$methods], false, true);
+ $invocationMocker = $invocationHandler->expects($matcher);
+ } else {
+ $invocationMocker = new InvocationMocker(
+From 30856643c6c70d3270a8a0f7ee4b891f0247baad Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20Bundyra?= <contact@webimpress.com>
+Date: Thu, 16 Apr 2026 21:09:13 +0100
+Subject: [PATCH] chore: Run tests on PHPUnit ~13.1.0 (#95)
+
+---
+ .github/workflows/tests.yml | 19 +++++++++++++++++++
+ tests/MockObjectProxyTest.php | 12 ++++++++++--
+ 2 files changed, 29 insertions(+), 2 deletions(-)
+
+diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
+index 9d4c30d..e6182a0 100644
+--- a/.github/workflows/tests.yml
++++ b/.github/workflows/tests.yml
+@@ -25,6 +25,7 @@ jobs:
+ - '7.1'
+ - '7.0'
+ phpunit-version:
++ - "13.1.0"
+ - "13.0.0"
+ - '12.5.0'
+ - '12.4.0'
+@@ -163,6 +164,8 @@ jobs:
+ phpunit-version: '6.0.0'
+
+ # PHP 8.3 Exclusions
++ - php-version: '8.3'
++ phpunit-version: '13.1.0'
+ - php-version: '8.3'
+ phpunit-version: '13.0.0'
+ - php-version: '8.3'
+@@ -211,6 +214,8 @@ jobs:
+ phpunit-version: '6.0.0'
+
+ # PHP 8.2 Exclusions
++ - php-version: '8.2'
++ phpunit-version: '13.1.0'
+ - php-version: '8.2'
+ phpunit-version: '13.0.0'
+ - php-version: '8.2'
+@@ -271,6 +276,8 @@ jobs:
+ phpunit-version: '6.0.0'
+
+ # PHP 8.1 Exclusions
++ - php-version: '8.1'
++ phpunit-version: '13.1.0'
+ - php-version: '8.1'
+ phpunit-version: '13.0.0'
+ - php-version: '8.1'
+@@ -343,6 +350,8 @@ jobs:
+ phpunit-version: '6.0.0'
+
+ # PHP 8.0 Exclusions
++ - php-version: '8.0'
++ phpunit-version: '13.1.0'
+ - php-version: '8.0'
+ phpunit-version: '13.0.0'
+ - php-version: '8.0'
+@@ -423,6 +432,8 @@ jobs:
+ phpunit-version: '6.0.0'
+
+ # PHP 7.4 Exclusions
++ - php-version: '7.4'
++ phpunit-version: '13.1.0'
+ - php-version: '7.4'
+ phpunit-version: '13.0.0'
+ - php-version: '7.4'
+@@ -489,6 +500,8 @@ jobs:
+ phpunit-version: '6.0.0'
+
+ # PHP 7.3 Exclusions
++ - php-version: '7.3'
++ phpunit-version: '13.1.0'
+ - php-version: '7.3'
+ phpunit-version: '13.0.0'
+ - php-version: '7.3'
+@@ -529,6 +542,8 @@ jobs:
+ phpunit-version: '10.0.0'
+
+ # PHP 7.2 Exclusions
++ - php-version: '7.2'
++ phpunit-version: '13.1.0'
+ - php-version: '7.2'
+ phpunit-version: '13.0.0'
+ - php-version: '7.2'
+@@ -583,6 +598,8 @@ jobs:
+ phpunit-version: '9.0.0'
+
+ # PHP 7.1 Exclusions
++ - php-version: '7.1'
++ phpunit-version: '13.1.0'
+ - php-version: '7.1'
+ phpunit-version: '13.0.0'
+ - php-version: '7.1'
+@@ -649,6 +666,8 @@ jobs:
+ phpunit-version: '8.0.0'
+
+ # PHP 7.0 Exclusions
++ - php-version: '7.0'
++ phpunit-version: '13.1.0'
+ - php-version: '7.0'
+ phpunit-version: '13.0.0'
+ - php-version: '7.0'
+diff --git a/tests/MockObjectProxyTest.php b/tests/MockObjectProxyTest.php
+index 593b15c..5758ae5 100644
+--- a/tests/MockObjectProxyTest.php
++++ b/tests/MockObjectProxyTest.php
+@@ -60,7 +60,9 @@ public function testExpects()
+ if (class_exists(\PHPUnit\Runner\Version::class)
+ && version_compare(\PHPUnit\Runner\Version::id(), '8.4.0') >= 0
+ ) {
+- $invocationHandler = new InvocationHandler([$methods], false, true);
++ $invocationHandler = version_compare(\PHPUnit\Runner\Version::id(), '13.1.0') >= 0
++ ? new InvocationHandler([$methods], '', false, true)
++ : new InvocationHandler([$methods], false, true);
+ $invocationMocker = $invocationHandler->expects($matcher);
+ } else {
+ $invocationMocker = new InvocationMocker(
+@@ -172,7 +174,13 @@ public static function provideTestProxiedMethods()
+ if (class_exists(\PHPUnit\Runner\Version::class)
+ && version_compare(\PHPUnit\Runner\Version::id(), '8.4.0') >= 0
+ ) {
+- $return[] = ['__phpunit_getInvocationHandler', [], new InvocationHandler([], false)];
++ $return[] = [
++ '__phpunit_getInvocationHandler',
++ [],
++ version_compare(\PHPUnit\Runner\Version::id(), '13.1.0') >= 0
++ ? new InvocationHandler([], '', false)
++ : new InvocationHandler([], false)
++ ];
+ } else {
+ $return[] = [
+ '__phpunit_getInvocationMocker',
reply other threads:[~2026-09-03 7:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178842174157.1.7350085349331284559.rpms-php-mock-phpunit2-05d5ca5384ec@fedoraproject.org \
--to=remi@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox