Skip to content

Commit 1730e24

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Backport changes to prepare typed properties Cast ini_get to an integer to match expected type Add no-interaction for SYMFONY_PHPUNIT_REMOVE Add no-interaction for SYMFONY_PHPUNIT_REQUIRE on prophecy Fix deps [Mailer] Added OhMySMTP Bridge [Notifier] Add Esendex message ID to SentMessage object Remove indices in messenger table on MySQL to prevent deadlocks while removing messages when running multiple consumers autoconfigure chatter.transport_factory Handle ignoreExtraKeys in config builder
2 parents a9a0553 + aa2bbd4 commit 1730e24

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory;
9191
use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunTransportFactory;
9292
use Symfony\Component\Mailer\Bridge\Mailjet\Transport\MailjetTransportFactory;
93+
use Symfony\Component\Mailer\Bridge\OhMySmtp\Transport\OhMySmtpTransportFactory;
9394
use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory;
9495
use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridTransportFactory;
9596
use Symfony\Component\Mailer\Bridge\Sendinblue\Transport\SendinblueTransportFactory;
@@ -151,6 +152,7 @@
151152
use Symfony\Component\Notifier\Bridge\Zulip\ZulipTransportFactory;
152153
use Symfony\Component\Notifier\Notifier;
153154
use Symfony\Component\Notifier\Recipient\Recipient;
155+
use Symfony\Component\Notifier\Transport\TransportFactoryInterface as NotifierTransportFactoryInterface;
154156
use Symfony\Component\PropertyAccess\PropertyAccessor;
155157
use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface;
156158
use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface;
@@ -2334,6 +2336,7 @@ private function registerMailerConfiguration(array $config, ContainerBuilder $co
23342336
SendgridTransportFactory::class => 'mailer.transport_factory.sendgrid',
23352337
SendinblueTransportFactory::class => 'mailer.transport_factory.sendinblue',
23362338
SesTransportFactory::class => 'mailer.transport_factory.amazon',
2339+
OhMySmtpTransportFactory::class => 'mailer.transport_factory.ohmysmtp',
23372340
];
23382341

23392342
foreach ($classToServices as $class => $service) {
@@ -2406,6 +2409,12 @@ private function registerNotifierConfiguration(array $config, ContainerBuilder $
24062409

24072410
$container->getDefinition('notifier.channel_policy')->setArgument(0, $config['channel_policy']);
24082411

2412+
$container->registerForAutoconfiguration(NotifierTransportFactoryInterface::class)
2413+
->addTag('chatter.transport_factory');
2414+
2415+
$container->registerForAutoconfiguration(NotifierTransportFactoryInterface::class)
2416+
->addTag('texter.transport_factory');
2417+
24092418
$classToServices = [
24102419
AllMySmsTransportFactory::class => 'notifier.transport_factory.allmysms',
24112420
AmazonSnsTransportFactory::class => 'notifier.transport_factory.amazonsns',

Resources/config/mailer_transports.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory;
1717
use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunTransportFactory;
1818
use Symfony\Component\Mailer\Bridge\Mailjet\Transport\MailjetTransportFactory;
19+
use Symfony\Component\Mailer\Bridge\OhMySmtp\Transport\OhMySmtpTransportFactory;
1920
use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory;
2021
use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridTransportFactory;
2122
use Symfony\Component\Mailer\Bridge\Sendinblue\Transport\SendinblueTransportFactory;
@@ -76,6 +77,10 @@
7677
->parent('mailer.transport_factory.abstract')
7778
->tag('mailer.transport_factory')
7879

80+
->set('mailer.transport_factory.ohmysmtp', OhMySmtpTransportFactory::class)
81+
->parent('mailer.transport_factory.abstract')
82+
->tag('mailer.transport_factory')
83+
7984
->set('mailer.transport_factory.smtp', EsmtpTransportFactory::class)
8085
->parent('mailer.transport_factory.abstract')
8186
->tag('mailer.transport_factory', ['priority' => -100])

0 commit comments

Comments
 (0)