Skip to content

Commit a9b5e53

Browse files
committed
minor #13213 [Notifier] Add section Disabling Delivery (jschaedl)
This PR was squashed before being merged into the 5.0 branch (closes #13213). Discussion ---------- [Notifier] Add section Disabling Delivery <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap 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 `master` for features of unreleased versions). --> Commits ------- 7d63e43 [Notifier] Add section Disabling Delivery
2 parents 35ae493 + 7d63e43 commit a9b5e53

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

notifier.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,26 @@ and
556556
:class:`Symfony\\Component\\Notifier\\Notification\\EmailNotificationInterface`
557557
also exists to modify messages send to those channels.
558558

559+
Development & Debugging
560+
-----------------------
561+
562+
Disabling Delivery
563+
~~~~~~~~~~~~~~~~~~
564+
565+
While developing (or testing), you may want to disable delivery of notifications entirely.
566+
You can do this by forcing Notifier to use the ``NullTransport`` for all configured texter
567+
and chatter transports in only the ``dev`` (or respectively ``test``) environment:
568+
569+
.. code-block:: yaml
570+
571+
# config/packages/dev/notifier.yaml
572+
framework:
573+
notifier:
574+
texter_transports:
575+
twilio: 'null://null'
576+
chatter_transports:
577+
slack: 'null://null'
578+
559579
.. TODO
560580
- Using the message bus for asynchronous notification
561581
- Describe notifier monolog handler

0 commit comments

Comments
 (0)