From edbaa404775de79d357d892ddf9c39437bc56c1a Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 21 Jun 2025 13:54:45 +0200 Subject: [PATCH] [Mailer] Remove deprecated TransportFactoryTestCase --- UPGRADE-8.0.md | 5 ++ src/Symfony/Component/Mailer/CHANGELOG.md | 5 ++ .../Mailer/Test/TransportFactoryTestCase.php | 64 ------------------- 3 files changed, 10 insertions(+), 64 deletions(-) delete mode 100644 src/Symfony/Component/Mailer/Test/TransportFactoryTestCase.php diff --git a/UPGRADE-8.0.md b/UPGRADE-8.0.md index 7b360f181b9da..b77a163523429 100644 --- a/UPGRADE-8.0.md +++ b/UPGRADE-8.0.md @@ -165,6 +165,11 @@ Ldap * Remove `LdapUser::eraseCredentials()` in favor of `__serialize()` +Mailer +------ + + * Remove `TransportFactoryTestCase`, extend `AbstractTransportFactoryTestCase` instead + Notifier -------- diff --git a/src/Symfony/Component/Mailer/CHANGELOG.md b/src/Symfony/Component/Mailer/CHANGELOG.md index 3816cc474948b..89be99a454df7 100644 --- a/src/Symfony/Component/Mailer/CHANGELOG.md +++ b/src/Symfony/Component/Mailer/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +8.0 +--- + + * Remove `TransportFactoryTestCase`, extend `AbstractTransportFactoryTestCase` instead + 7.3 --- diff --git a/src/Symfony/Component/Mailer/Test/TransportFactoryTestCase.php b/src/Symfony/Component/Mailer/Test/TransportFactoryTestCase.php deleted file mode 100644 index 782bba37c44db..0000000000000 --- a/src/Symfony/Component/Mailer/Test/TransportFactoryTestCase.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Mailer\Test; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Mailer\Transport\Dsn; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; - -/** - * A test case to ease testing Transport Factory. - * - * @author Konstantin Myakshin - * - * @deprecated since Symfony 7.2, use AbstractTransportFactoryTestCase instead - */ -abstract class TransportFactoryTestCase extends AbstractTransportFactoryTestCase -{ - use IncompleteDsnTestTrait; - - protected EventDispatcherInterface $dispatcher; - protected HttpClientInterface $client; - protected LoggerInterface $logger; - - /** - * @psalm-return iterable - */ - public static function unsupportedSchemeProvider(): iterable - { - return []; - } - - /** - * @psalm-return iterable - */ - public static function incompleteDsnProvider(): iterable - { - return []; - } - - protected function getDispatcher(): EventDispatcherInterface - { - return $this->dispatcher ??= $this->createMock(EventDispatcherInterface::class); - } - - protected function getClient(): HttpClientInterface - { - return $this->client ??= $this->createMock(HttpClientInterface::class); - } - - protected function getLogger(): LoggerInterface - { - return $this->logger ??= $this->createMock(LoggerInterface::class); - } -}