New in Symfony 5.2: Notifier improvements
![Avatar of Javier Eguiluz](https://connect.symfony.com/api/images/17170f22-52c0-4adf-a75d-29cb01d53176.png?format=80x80)
Warning: This post is about an unsupported Symfony version. Some of this information may be out of date. Read the most recent Symfony Docs.
The Notifier component sends notifications via one or more channels (email, SMS and chats like Slack and Telegram). In Symfony 5.2 we've improved it with the following features.
Symfony profiler integration
Contributed by
Jan Schädlich
in #36479.
One of the main missing features of the Notifier component was the lack of integration with the Symfony debug toolbar and profiler. In Symfony 5.2 we've fixed that. First, the debug toolbar now displays the number of sent notifications and the channels used to send them:
![Symfony Notifier Web Debug Toolbar](https://symfony.com/uploads/assets/blog/symfony-notifier-web-debug-toolbar.png)
If you click on that toolbar section, you can see the new Notifier panel in the Symfony Profiler, which displays a summary of the notification activity:
![Symfony Notifier Web Debug Profiler Metrics](https://symfony.com/uploads/assets/blog/symfony-notifier-web-debug-profiler-metrics.png)
You can also inspect the full details of all sent notifications:
![Symfony Notifier Web Debug Profiler Details](https://symfony.com/uploads/assets/blog/symfony-notifier-web-debug-profiler-details.png)
Return sent messages
Contributed by
Jérémy Romey
in #36611.
In previous Symfony versions, the send()
method of each notifier didn't
return anything. Starting from Symfony 5.2 they return a
Symfony
object, which provides
access to the original message and transport and to the ID of the sent message,
making it easier to debug.
New integrations
The Notifier component already integrates with lots of third-party services, but in Symfony 5.2 we've added a ton of new integrations:
- Infobip SMS in PR #36480 provided by Jérémy Romey;
- Google Chat in PR #36488 provided by Jérôme Tamarelle;
- Esendex SMS in PR #36573 provided by Olivier Dolbeau;
- Zulip Chat in PR #36616 provided by Mohammad Emran Hasan;
- Mobyt SMS in PR #36648 provided by Bastien Durand;
- SMSAPI SMS in PR #36940 provided by Marcin Szepczynski;
- LinkedIn in PR #37830 provided by Smaine Milianni;
- Sendinblue SMS in PR #38298 provided by Pierre Tondereau;
- Discord Chat in PR #38522 provided by Karoly Gossler and Mathieu Piot;
- Improved Telegram Chat to allow define some options in PR #36496 provided by Mihail Krasilnikov.
Help the Symfony project!
As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.
Comments
Comments are closed.
To ensure that comments stay relevant, they are closed for old posts.
But in the "new Integration" section.
Mobyt SMS in PR #36648 is by Deamon in fact (copy paste error?).