10000 minor #46542 [Mailer] Sort transports alphabetically (OskarStark) · symfony/symfony@18aea63 · GitHub
[go: up one dir, main page]

Skip to content

Commit 18aea63

Browse files
committed
minor #46542 [Mailer] Sort transports alphabetically (OskarStark)
This PR was merged into the 5.4 branch. Discussion ---------- [Mailer] Sort transports alphabetically | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Spotted in #46211 | License | MIT | Doc PR | - So the sorting does not needs to be done in #46211 cc @B-Galati Commits ------- 5d76dbb [Mailer] Sort transports alphabetically
2 parents 6893229 + 5d76dbb commit 18aea63

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2437,11 +2437,11 @@ private function registerMailerConfiguration(array $config, ContainerBuilder $co
24372437
MailgunTransportFactory::class => 'mailer.transport_factory.mailgun',
24382438
MailjetTransportFactory::class => 'mailer.transport_factory.mailjet',
24392439
MandrillTransportFactory::class => 'mailer.transport_factory.mailchimp',
2440+
OhMySmtpTransportFactory::class => 'mailer.transport_factory.ohmysmtp',
24402441
PostmarkTransportFactory::class => 'mailer.transport_factory.postmark',
24412442
SendgridTransportFactory::class => 'mailer.transport_factory.sendgrid',
24422443
SendinblueTransportFactory::class => 'mailer.transport_factory.sendinblue',
24432444
SesTransportFactory::class => 'mailer.transport_factory.amazon',
2444-
OhMySmtpTransportFactory::class => 'mailer.transport_factory.ohmysmtp',
24452445
];
24462446

24472447
foreach ($classToServices as $class => $service) {

src/Symfony/Component/Mailer/Exception/UnsupportedSchemeException.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ class UnsupportedSchemeException extends LogicException
3636
'class' => Bridge\Mailchimp\Transport\MandrillTransportFactory::class,
3737
'package' => 'symfony/mailchimp-mailer',
3838
],
39+
'ohmysmtp' => [
40+
'class' => Bridge\OhMySmtp\Transport\OhMySmtpTransportFactory::class,
41+
'package' => 'symfony/oh-my-smtp-mailer',
42+
],
3943
'postmark' => [
4044
'class' => Bridge\Postmark\Transport\PostmarkTransportFactory::class,
4145
'package' => 'symfony/postmark-mailer',
@@ -52,10 +56,6 @@ class UnsupportedSchemeException extends LogicException
5256
'class' => Bridge\Amazon\Transport\SesTransportFactory::class,
5357
'package' => 'symfony/amazon-mailer',
5458
],
55-
'ohmysmtp' => [
56-
'class' => Bridge\OhMySmtp\Transport\OhMySmtpTransportFactory::class,
57-
'package' => 'symfony/oh-my-smtp-mailer',
58-
],
5959
];
6060

6161
public function __construct(Dsn $dsn, string $name = null, array $supported = [])

src/Symfony/Component/Mailer/Tests/Exception/UnsupportedSchemeExceptionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ public static function setUpBeforeClass(): void
3838
MailgunTransportFactory::class => false,
3939
MailjetTransportFactory::class => false,
4040
MandrillTransportFactory::class => false,
41+
OhMySmtpTransportFactory::class => false,
4142
PostmarkTransportFactory::class => false,
4243
SendgridTransportFactory::class => false,
4344
SendinblueTransportFactory::class => false,
44-
OhMySmtpTransportFactory::class => false,
4545
SesTransportFactory::class => false,
FE66
4646
]);
4747
}
@@ -65,10 +65,10 @@ public function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \Generat
6565
yield ['mailgun', 'symfony/mailgun-mailer'];
6666
yield ['mailjet', 'symfony/mailjet-mailer'];
6767
yield ['mandrill', 'symfony/mailchimp-mailer'];
68+
yield ['ohmysmtp', 'symfony/oh-my-smtp-mailer'];
6869
yield ['postmark', 'symfony/postmark-mailer'];
6970
yield ['sendgrid', 'symfony/sendgrid-mailer'];
7071
yield ['sendinblue', 'symfony/sendinblue-mailer'];
71-
yield ['ohmysmtp', 'symfony/oh-my-smtp-mailer'];
7272
yield ['ses', 'symfony/amazon-mailer'];
7373
}
7474

src/Symfony/Component/Mailer/Transport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ class Transport
4949
MailgunTransportFactory::class,
5050
MailjetTransportFactory::class,
5151
MandrillTransportFactory::class,
52+
OhMySmtpTransportFactory::class,
5253
PostmarkTransportFactory::class,
5354
SendgridTransportFactory::class,
5455
SendinblueTransportFactory::class,
55-
OhMySmtpTransportFactory::class,
5656
SesTransportFactory::class,
5757
];
5858

0 commit comments

Comments
 (0)
0