You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #16906 [Notifier] Fix documentation symfony notifier (matthieudelmas)
This PR was submitted for the 6.2 branch but it was merged into the 5.4 branch instead.
Discussion
----------
[Notifier] Fix documentation symfony notifier
Hi there 👋
After following [the notifier doc](https://symfony.com/doc/current/notifier.html#customize-notification-messages) to send slack notifications, I think there is a problem at the message customization step :
- I successfully get a slack notification, but when we go to the "Notifications" tab of the Symfony profiler I have an error message "`Impossible to invoke a method ("getSubject") on a variable null" `

- when i dump the created ChatMessage, i see that the notification is empty.

=> Reading the ChatMessage class, it seems that the static method **fromNotification** can solves this problem _(check PR proposal)_
The other fixes are more obvious:
- use RecipientInterface instead of SmsRecipientInterface since in the asChatMessage we use the RecipientInterface
- strval on price in the message since price is an integer
- method emoji on notification not on ChatMessage as the doc is telling us
_(FYI this is my first public PR on github)_
<!--
If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/releases for the list of maintained branches).
If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `6.x` for features of unreleased versions).
-->
Commits
-------
71ff918 Fix documentation symfony notifier
0 commit comments