-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Notifier] Add Amazon SNS bridge #39141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
src/Symfony/Component/Notifier/Bridge/Amazon/AmazonTransportFactory.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Amazon/AmazonTransport.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Amazon/AmazonTransport.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Amazon/AmazonTransportFactory.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Amazon/AmazonTransport.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Amazon/AmazonTransportFactory.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Amazon/Tests/AmazonTransportFactoryTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Amazon/Tests/AmazonTransportFactoryTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Amazon/AmazonTransport.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Amazon/AmazonTransportFactory.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Amazon/AmazonTransport.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsOptions.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsTransport.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Exception/UnsupportedSchemeException.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsTransportFactory.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsTransportFactory.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsTransportFactory.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsTransportFactory.php
Outdated
Show resolved
Hide resolved
Please create Doc PR, thanks |
$response = $this->snsClient->publish($options); | ||
|
||
$message = new SentMessage($message, (string) $this); | ||
$message->setMessageId($response->getMessageId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would wrap this in a try/catch block to convert AsyncAws
exceptions into TransportException
@adrien-chinour Are you still interested in finishing this implementation? |
Yes, I will work on it. |
"require": { | ||
"php": ">=7.2.5", | ||
"symfony/http-client": "^4.4|^5.2", | ||
"symfony/notifier": "^5.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"symfony/notifier": "^5.3", | |
"symfony/notifier": "^5.4", |
Please add the bridge to the |
public function toArray(): array | ||
{ | ||
$options = $this->options; | ||
unset($options['recipient_id']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why storing the recipient in the option
property if we don't use it not a standard option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jderusse Yes, I change it to a class property and a required parameter on constructor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
I just had some small comments.
src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsTransport.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsTransport.php
Outdated
Show resolved
Hide resolved
Final review @Nyholm ? |
src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsTransport.php
Outdated
Show resolved
Hide resolved
Thank you @adrien-chinour. |
This PR was merged into the 5.4 branch. Discussion ---------- [Notifier] Add AmazonSns Bridge AmazonSns Bridge : [symfony/symfony #39141](symfony/symfony#39141) Commits ------- 6ab1a8d [Notifier] Add AmazonSns Bridge
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 ofasyc-aws/core
.I'm working on recipe and doc PR.