From 6a1901d1a24a3e1f82da82a796426f81b0d832c2 Mon Sep 17 00:00:00 2001 From: Thibaud BARDIN Date: Sun, 1 Sep 2019 00:14:51 +0200 Subject: [PATCH] Replace misused EventListener with an EventSubscriber. The existing code for the "Global from Address" makes use of an EventSubscriber but the namespace & name of the file is wrongly named as an EventListener which could create confusion. --- mailer.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mailer.rst b/mailer.rst index a4922c877d2..b2849b35b90 100644 --- a/mailer.rst +++ b/mailer.rst @@ -258,14 +258,14 @@ Global from Address Instead of calling ``->from()`` *every* time you create a new email, you can create an event subscriber to set it automatically:: - // src/EventListener/MailerFromListener.php - namespace App\EventListener; + // src/EventSubscriber/MailerFromSubscriber.php + namespace App\EventSubscriber; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Mailer\Event\MessageEvent; use Symfony\Component\Mime\Email; - class MailerFromListener implements EventSubscriberInterface + class MailerFromSubscriber implements EventSubscriberInterface { public function onMessageSend(MessageEvent $event) {