From a12d2c0af097b6bf7eb3f9efbcf1fea5986e002d Mon Sep 17 00:00:00 2001 From: Alfonsas Cirtautas Date: Wed, 5 Aug 2026 16:18:14 +0300 Subject: [PATCH] Allow PHPUnit 11 and 12 The suite ran on the EOL PHPUnit 10.5 line. The constraint becomes ^11.5 || ^12.5: PHP 8.3+ resolves PHPUnit 12, while PHP 8.2 - still supported and CI-tested - stays on PHPUnit 11 (PHPUnit 12 requires PHP 8.3). phpunit.xml.dist already uses the shared 10/11/12 attribute subset and needs no changes. The one thing PHPUnit 12 flagged: the HTTP response provider test mocked Twig without configuring expectations - it is a stub. --- CHANGELOG.md | 6 ++++++ composer.json | 2 +- tests/Unit/Provider/EveryPayHttpResponseProviderTest.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ae4131..ef3425a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 merchant portal, and the notification clears once the resolution callback updates the stored state. +### Changed + +- The test suite runs on PHPUnit 11/12 (`^11.5 || ^12.5`, was the EOL + `^10.5`): PHP 8.3+ resolves PHPUnit 12, PHP 8.2 stays on PHPUnit 11. + Dev-only - nothing changes for consumers of the plugin. + ### Fixed - An admin refund rejected by EveryPay because the payment was already diff --git a/composer.json b/composer.json index efd1d98..c108d13 100644 --- a/composer.json +++ b/composer.json @@ -49,7 +49,7 @@ "phpstan/extension-installer": "^1.4", "phpstan/phpstan": "^2.0", "phpstan/phpstan-doctrine": "^2.0", - "phpunit/phpunit": "^10.5", + "phpunit/phpunit": "^11.5 || ^12.5", "sylius-labs/coding-standard": "^4.4", "sylius/sylius": "^2.2", "sylius/test-application": "^2.2@alpha", diff --git a/tests/Unit/Provider/EveryPayHttpResponseProviderTest.php b/tests/Unit/Provider/EveryPayHttpResponseProviderTest.php index 669536f..f9e1f3b 100644 --- a/tests/Unit/Provider/EveryPayHttpResponseProviderTest.php +++ b/tests/Unit/Provider/EveryPayHttpResponseProviderTest.php @@ -129,7 +129,7 @@ public function testDoesNotSupportRequestsWithoutAPaymentLink(): void private function provider(): EveryPayHttpResponseProvider { - return new EveryPayHttpResponseProvider($this->createMock(Environment::class), new MethodGridViewFactory()); + return new EveryPayHttpResponseProvider($this->createStub(Environment::class), new MethodGridViewFactory()); } private function requestConfiguration(): RequestConfiguration