Skip to content

Commit 2737175

Browse files
committed
feature #39141 [Notifier] Add Amazon SNS bridge (adrien-chinour)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- [Notifier] Add Amazon SNS bridge | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | | License | MIT | Doc PR | [symfony/symfony-docs#15486](symfony/symfony-docs#15486) | Recipe PR | symfony/recipes#847 Hi, This PR add a bridge on Notifier component for Amazon SNS. This bridge use `async-aws/sns` and only work on actual dev-master version of `asyc-aws/core`. I'm working on recipe and doc PR. Commits ------- 3dc6ad4b73 [Notifier] Add Amazon SNS bridge
2 parents b35e9a4 + 40be695 commit 2737175

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
use Symfony\Component\Mime\MimeTypeGuesserInterface;
111111
use Symfony\Component\Mime\MimeTypes;
112112
use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsTransportFactory;
113+
use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsTransportFactory;
113114
use Symfony\Component\Notifier\Bridge\Clickatell\ClickatellTransportFactory;
114115
use Symfony\Component\Notifier\Bridge\Discord\DiscordTransportFactory;
115116
use Symfony\Component\Notifier\Bridge\Esendex\EsendexTransportFactory;
@@ -2421,6 +2422,7 @@ private function registerNotifierConfiguration(array $config, ContainerBuilder $
24212422

24222423
$classToServices = [
24232424
AllMySmsTransportFactory::class => 'notifier.transport_factory.allmysms',
2425+
AmazonSnsTransportFactory::class => 'notifier.transport_factory.amazonsns',
24242426
ClickatellTransportFactory::class => 'notifier.transport_factory.clickatell',
24252427
DiscordTransportFactory::class => 'notifier.transport_factory.discord',
24262428
EsendexTransportFactory::class => 'notifier.transport_factory.esendex',
@@ -2464,6 +2466,7 @@ private function registerNotifierConfiguration(array $config, ContainerBuilder $
24642466

24652467
foreach ($classToServices as $class => $service) {
24662468
switch ($package = substr($service, \strlen('notifier.transport_factory.'))) {
2469+
case 'amazonsns': $package = 'amazon-sns'; break;
24672470
case 'fakechat': $package = 'fake-chat'; break;
24682471
case 'fakesms': $package = 'fake-sms'; break;
24692472
case 'freemobile': $package = 'free-mobile'; break;

Resources/config/notifier_transports.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
1313

1414
use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsTransportFactory;
15+
use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsTransportFactory;
1516
use Symfony\Component\Notifier\Bridge\Clickatell\ClickatellTransportFactory;
1617
use Symfony\Component\Notifier\Bridge\Discord\DiscordTransportFactory;
1718
use Symfony\Component\Notifier\Bridge\Esendex\EsendexTransportFactory;
@@ -178,6 +179,11 @@
178179
->parent('notifier.transport_factory.abstract')
179180
->tag('texter.transport_factory')
180181

182+
->set('notifier.transport_factory.amazonsns', AmazonSnsTransportFactory::class)
183+
->parent('notifier.transport_factory.abstract')
184+
->tag('texter.transport_factory')
185+
->tag('chatter.transport_factory')
186+
181187
->set('notifier.transport_factory.null', NullTransportFactory::class)
182188
->parent('notifier.transport_factory.abstract')
183189
->tag('chatter.transport_factory')

0 commit comments

Comments
 (0)