diff --git a/composer.json b/composer.json index 8137c5e9..68a1b140 100644 --- a/composer.json +++ b/composer.json @@ -48,6 +48,7 @@ "symfony/console": "^6.4.0", "symfony/css-selector": "^6.4.0", "symfony/dependency-injection": "^6.4.0", + "symfony/deprecation-contracts": "^3.5.0", "symfony/doctrine-bridge": "^6.4.0", "symfony/doctrine-messenger": "^6.4.0", "symfony/dom-crawler": "^6.4.0", diff --git a/packages/tester-bundle/EventDispatcher/EventListenerTestTrait.php b/packages/tester-bundle/EventDispatcher/EventListenerTestTrait.php index 0d261d0e..52f43de7 100644 --- a/packages/tester-bundle/EventDispatcher/EventListenerTestTrait.php +++ b/packages/tester-bundle/EventDispatcher/EventListenerTestTrait.php @@ -4,6 +4,11 @@ use PHPUnit\Framework\TestCase; +trigger_deprecation('draw/tester-bundle', '0.10.44', 'The "%s" class is deprecated, use "%s" instead.', EventListenerTestTrait::class, EventDispatcherTesterTrait::class); + +/** + * @deprecated + */ trait EventListenerTestTrait { public static function assertEventListenersRegistered(string $className, array $expectedEvents): void diff --git a/packages/tester-bundle/composer.json b/packages/tester-bundle/composer.json index 0200556a..55d190c0 100644 --- a/packages/tester-bundle/composer.json +++ b/packages/tester-bundle/composer.json @@ -15,6 +15,7 @@ "draw/core": "^0.11", "draw/tester": "^0.11", "symfony/browser-kit": "^6.4.0", + "symfony/deprecation-contracts": "^3.5.0", "symfony/framework-bundle": "^6.4.0", "symfony/http-foundation": "^6.4.0", "symfony/validator": "^6.4.0" diff --git a/tests/Mailer/EventListener/EmailComposerListenerTest.php b/tests/Mailer/EventListener/EmailComposerListenerTest.php deleted file mode 100644 index eb71c715..00000000 --- a/tests/Mailer/EventListener/EmailComposerListenerTest.php +++ /dev/null @@ -1,30 +0,0 @@ -object = static::getContainer()->get(EmailComposerListener::class); - } - - public function testEventListenersRegistered(): void - { - static::assertEventListenersRegistered( - $this->object::class, - [ - MessageEvent::class => ['composeMessage'], - ] - ); - } -}