From b1275294c9e511d5b1a507cb0c314a068d401d83 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 2 Jun 2025 16:08:14 +0200 Subject: [PATCH 1/7] Allow Symfony ^8.0 --- composer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 598bbdc..d125e76 100644 --- a/composer.json +++ b/composer.json @@ -20,13 +20,13 @@ "symfony/event-dispatcher-contracts": "^2.5|^3" }, "require-dev": { - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/config": "^6.4|^7.0", - "symfony/error-handler": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/error-handler": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", "psr/log": "^1|^2|^3" }, "conflict": { From 6ab9e2ab46536e4424a23e98916c55efbc7d62a2 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 2 Jun 2025 17:50:55 +0200 Subject: [PATCH 2/7] Bump Symfony 8 to PHP >= 8.4 --- composer.json | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index d125e76..5702710 100644 --- a/composer.json +++ b/composer.json @@ -16,21 +16,20 @@ } ], "require": { - "php": ">=8.2", + "php": ">=8.4", "symfony/event-dispatcher-contracts": "^2.5|^3" }, "require-dev": { - "symfony/dependency-injection": "^6.4|^7.0|^8.0", - "symfony/expression-language": "^6.4|^7.0|^8.0", - "symfony/config": "^6.4|^7.0|^8.0", - "symfony/error-handler": "^6.4|^7.0|^8.0", - "symfony/http-foundation": "^6.4|^7.0|^8.0", + "psr/log": "^1|^2|^3", + "symfony/config": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/error-handler": "^7.4|^8.0", + "symfony/expression-language": "^7.4|^8.0", + "symfony/http-foundation": "^7.4|^8.0", "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^6.4|^7.0|^8.0", - "psr/log": "^1|^2|^3" + "symfony/stopwatch": "^7.4|^8.0" }, "conflict": { - "symfony/dependency-injection": "<6.4", "symfony/service-contracts": "<2.5" }, "provide": { From 73d28452dd0b2cf57112ab988e9b51cba04c85e6 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 4 Jun 2025 18:31:05 +0200 Subject: [PATCH 3/7] Enforce return types on all components --- EventSubscriberInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EventSubscriberInterface.php b/EventSubscriberInterface.php index 2085e42..ca0d696 100644 --- a/EventSubscriberInterface.php +++ b/EventSubscriberInterface.php @@ -45,5 +45,5 @@ interface EventSubscriberInterface * * @return array> */ - public static function getSubscribedEvents(); + public static function getSubscribedEvents(): array; } From 251c9a690c8f7c23bc370461fbfb135f659b91b8 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 9 Oct 2024 11:06:51 +0200 Subject: [PATCH 4/7] run tests using PHPUnit 11.5 --- phpunit.xml.dist | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 4d47393..79bed7e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,10 +1,11 @@ @@ -18,7 +19,7 @@ - + ./ @@ -27,5 +28,9 @@ ./Tests ./vendor - + + + + + From 718199aed7979fa9ea039b606bb4c6bd6bb936ac Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 31 Jul 2025 14:36:46 +0200 Subject: [PATCH 5/7] replace PHPUnit annotations with attributes --- Tests/Debug/WrappedListenerTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Tests/Debug/WrappedListenerTest.php b/Tests/Debug/WrappedListenerTest.php index 1a5fe11..4648105 100644 --- a/Tests/Debug/WrappedListenerTest.php +++ b/Tests/Debug/WrappedListenerTest.php @@ -11,6 +11,7 @@ namespace Symfony\Component\EventDispatcher\Tests\Debug; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\Debug\WrappedListener; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -19,9 +20,7 @@ class WrappedListenerTest extends TestCase { - /** - * @dataProvider provideListenersToDescribe - */ + #[DataProvider('provideListenersToDescribe')] public function testListenerDescription($listener, $expected) { $wrappedListener = new WrappedListener($listener, null, $this->createMock(Stopwatch::class), $this->createMock(EventDispatcherInterface::class)); From 32f8d105ae7f5ded431246f40d514c8b25b35329 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 1 Aug 2025 14:58:41 +0200 Subject: [PATCH 6/7] run tests with PHPUnit 12.0 on PHP >= 8.3 --- Tests/EventDispatcherTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/Tests/EventDispatcherTest.php b/Tests/EventDispatcherTest.php index d6d0778..94f9ffc 100644 --- a/Tests/EventDispatcherTest.php +++ b/Tests/EventDispatcherTest.php @@ -411,8 +411,6 @@ public function testNamedClosures() $this->assertNotSame($callback1, $callback2); $this->assertNotSame($callback1, $callback3); $this->assertNotSame($callback2, $callback3); - $this->assertEquals($callback1, $callback2); - $this->assertEquals($callback1, $callback3); $this->dispatcher->addListener('foo', $callback1, 3); $this->dispatcher->addListener('foo', $callback2, 2); From eea2844b3899cc376f1e621719d0766ce14e03ec Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 12 Aug 2025 17:38:34 +0200 Subject: [PATCH 7/7] [EventDispatcher] conflict with symfony/security-http <7.4 --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 5702710..dba4d53 100644 --- a/composer.json +++ b/composer.json @@ -30,6 +30,7 @@ "symfony/stopwatch": "^7.4|^8.0" }, "conflict": { + "symfony/security-http": "<7.4", "symfony/service-contracts": "<2.5" }, "provide": {