From 307787ed6dc4f976b8123b87fd315650ab1d4e72 Mon Sep 17 00:00:00 2001 From: Tim Fennis Date: Tue, 21 Apr 2026 16:14:22 +0200 Subject: [PATCH] feat: support phpunit 13 Co-authored-by: Kimi --- .github/workflows/tests.yml | 9 +++++++++ CHANGELOG.md | 3 +++ composer.json | 2 +- .../Compiler/SetTestClientPassMockTest.php | 9 +++------ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 986874bb..df93c726 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -60,6 +60,15 @@ jobs: - php-version: 8.5 symfony-version: "^8.0" phpunit-version: "^12.0" + - php-version: 8.4 + symfony-version: "^7.0" + phpunit-version: "^13.0" + - php-version: 8.4 + symfony-version: "^8.0" + phpunit-version: "^13.0" + - php-version: 8.5 + symfony-version: "^8.0" + phpunit-version: "^13.0" steps: - name: Checkout diff --git a/CHANGELOG.md b/CHANGELOG.md index bdbc66dc..b9667363 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ Removed features deprecated in [4.6](#46) +## 4.15 +Added support for PHPUnit 13 + ## 4.14 Drop support for PHP 7.4 (it does not support Attributes, which are obligatory for compatibility with PHPUnit 12) diff --git a/composer.json b/composer.json index b9ec47f5..be87658b 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ ], "require": { "php": "^8.0", - "phpunit/phpunit": "^9.6 || ^10.0 || ^11.0 || ^12.0", + "phpunit/phpunit": "^9.6 || ^10.0 || ^11.0 || ^12.0 || ^13.0", "symfony/browser-kit": "^5.4 || ^6.4 || ^7.0 || ^8.0", "symfony/framework-bundle": "^5.4 || ^6.4 || ^7.0 || ^8.0" }, diff --git a/tests/DependencyInjection/Compiler/SetTestClientPassMockTest.php b/tests/DependencyInjection/Compiler/SetTestClientPassMockTest.php index 8aa333dc..9e0d81a7 100644 --- a/tests/DependencyInjection/Compiler/SetTestClientPassMockTest.php +++ b/tests/DependencyInjection/Compiler/SetTestClientPassMockTest.php @@ -36,16 +36,13 @@ public function testSetTestClientPassElse(): void ->disableOriginalConstructor() ->getMock(); - $container->expects($this->any()) - ->method('getParameter') + $container->method('getParameter') ->willReturn(true); - $container->expects($this->any()) - ->method('hasDefinition') + $container->method('hasDefinition') ->willReturn(false); - $container->expects($this->any()) - ->method('hasAlias') + $container->method('hasAlias') ->willReturn(false); try {