Skip to content

Commit ff26298

Browse files
committed
Merge branch '5.0'
* 5.0: Minor tweak [Notifier] Add section Disabling Delivery
2 parents 0e48e5f + cfe726f commit ff26298

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

notifier.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,24 @@ and
568568
:class:`Symfony\\Component\\Notifier\\Notification\\EmailNotificationInterface`
569569
also exists to modify messages send to those channels.
570570

571+
Disabling Delivery
572+
------------------
573+
574+
While developing (or testing), you may want to disable delivery of notifications
575+
entirely. You can do this by forcing Notifier to use the ``NullTransport`` for
576+
all configured texter and chatter transports only in the ``dev`` (and/or
577+
``test``) environment:
578+
579+
.. code-block:: yaml
580+
581+
# config/packages/dev/notifier.yaml
582+
framework:
583+
notifier:
584+
texter_transports:
585+
twilio: 'null://null'
586+
chatter_transports:
587+
slack: 'null://null'
588+
571589
.. TODO
572590
- Using the message bus for asynchronous notification
573591
- Describe notifier monolog handler

0 commit comments

Comments
 (0)