From 7d63e43c08835fdd94036ff61502f66a10cff0d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sch=C3=A4dlich?= Date: Sat, 22 Feb 2020 11:10:39 +0100 Subject: [PATCH] [Notifier] Add section Disabling Delivery --- notifier.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/notifier.rst b/notifier.rst index fe6dedb0070..9f19dadd235 100644 --- a/notifier.rst +++ b/notifier.rst @@ -553,6 +553,26 @@ and :class:`Symfony\\Component\\Notifier\\Notification\\EmailNotificationInterface` also exists to modify messages send to those channels. +Development & Debugging +----------------------- + +Disabling Delivery +~~~~~~~~~~~~~~~~~~ + +While developing (or testing), you may want to disable delivery of notifications entirely. +You can do this by forcing Notifier to use the ``NullTransport`` for all configured texter +and chatter transports in only the ``dev`` (or respectively ``test``) environment: + +.. code-block:: yaml + + # config/packages/dev/notifier.yaml + framework: + notifier: + texter_transports: + twilio: 'null://null' + chatter_transports: + slack: 'null://null' + .. TODO - Using the message bus for asynchronous notification - Describe notifier monolog handler