-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Tweak docs for Webhooks #19421
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
Tweak docs for Webhooks #19421
Conversation
@@ -19,17 +19,26 @@ Installation | |||
Usage in Combination with the Mailer Component | |||
---------------------------------------------- | |||
|
|||
When using a third-party mailer, you can use the Webhook component to receive | |||
webhook calls from the third-party mailer. | |||
When using a third-party mailer provider, you can use the Webhook component to |
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.
We are using "provider" in the notifier and mailer docs, let's use the same here.
file: | ||
For Mailgun, you will get a secret for the webhook. Store this secret as | ||
MAILER_MAILGUN_SECRET (in the :doc:`secrets management system | ||
</configuration/secrets>` or in a ``.env`` file). |
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 think we should encourage people to use Symfony secrets instead of .env. If you agree, I can work on a PR to make similar changes in other places.
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.
Makes sense to me
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.
My feeling is that env variables are far more used than secrets so I think it does not hurt to mention both, just my 2 cents
|
||
With this done, you can now add a RemoteEvent consumer to react to the webhooks:: | ||
For mailer webhooks, react to the | ||
:class:`Symfony\\Component\\RemoteEvent\\Event\\Mailer\\MailerDeliveryEvent` or |
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.
Having links to the events allows for a better discovery of all possible events.
@@ -145,12 +154,8 @@ SMS service Parser service name | |||
Twilio ``notifier.webhook.request_parser.twilio`` | |||
============ ========================================== | |||
|
|||
.. versionadded:: 6.3 | |||
|
|||
The support for Twilio was introduced in Symfony 6.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.
The component was added in 6.3, so we don't need that.
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.
Nice changes. Thanks Fabien.
c940708
to
534babd
Compare
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.
Nice! These are good improvements.
In this example Mailgun is used with ``'mailer_mailgun'`` as the webhook type. | ||
Any type name can be used as long as it is unique. Make sure to use it in the | ||
routing configuration, the webhook URL and the RemoteEvent consumer. | ||
Currently, the following third-party mailer providers support webhooks: |
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.
Currently, the following third-party SMS transports support webhooks:
L149
Should we also add 'provider' in sentence ?
Thanks Fabien. For the reviewers, feel free to provide smaller pull requests, thanks. |
Thank you so much @TimoBakx for having bootstrapped the webhook docs.
This PR hopefully contains some improvements.
I will be able to merge this PR up as it will probably generate some conflicts