File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,12 @@ The most common way to listen to an event is to register an **event listener**::
6767 Check out the :doc: `Symfony events reference </reference/events >` to see
6868 what type of object each event provides.
6969
70+ .. versionadded ::
71+
72+ The :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ ExceptionEvent ` class was
73+ introduced in Symfony 4.3. In previous versions it was called
74+ ``Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent ``.
75+
7076Now that the class is created, you need to register it as a service and
7177notify Symfony that it is a "listener" on the ``kernel.exception `` event by
7278using a special "tag":
@@ -187,12 +193,6 @@ listen to the same ``kernel.exception`` event::
187193That's it! Your ``services.yaml `` file should already be setup to load services from
188194the ``EventSubscriber `` directory. Symfony takes care of the rest.
189195
190- .. tip ::
191-
192- Since Symfony 4.3 you can subscribe to events using the FQCN of the event.
193- For example ``ExceptionEvent::class `` instead of ``KernelEvents::EXCEPTION ``.
194- This allows you to develop code based on pure PHP classes instead of inventing arbitrary strings to name events.
195-
196196.. _ref-event-subscriber-configuration :
197197
198198.. tip ::
You can’t perform that action at this time.
0 commit comments