Skip to content

Commit be8897b

Browse files
committed
feature #50879 [Notifier] support local development for sns by adding sslmode option (Ferror)
This PR was squashed before being merged into the 6.4 branch. Discussion ---------- [Notifier] support local development for sns by adding sslmode option | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | none | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> When developing locally with AWS -> localstack we have to communicate via HTTP similarly to the SQS Transport for Messenger component. https://github.com/symfony/amazon-sqs-messenger/blob/6.3/Transport/Connection.php#L50C14-L50C14 Commits ------- 92650d6 [Notifier] support local development for sns by adding sslmode option
2 parents 139419d + 92650d6 commit be8897b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsTransportFactory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ public function create(Dsn $dsn): AmazonSnsTransport
3131

3232
$host = 'default' === $dsn->getHost() ? null : $dsn->getHost();
3333
$port = $dsn->getPort();
34+
$sslmode = $dsn->getOption('sslmode', 'enable');
35+
$protocol = $sslmode === 'disable' ? 'http' : 'https';
3436

35-
$options = null === $host ? [] : ['endpoint' => 'https://'.$host.($port ? ':'.$port : '')];
37+
$options = null === $host ? [] : ['endpoint' => $protocol.'://'.$host.($port ? ':'.$port : '')];
3638

3739
if ($dsn->getUser()) {
3840
$options += [

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy