File tree 1 file changed +6
-6
lines changed
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**::
67
67
Check out the :doc: `Symfony events reference </reference/events >` to see
68
68
what type of object each event provides.
69
69
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
+
70
76
Now that the class is created, you need to register it as a service and
71
77
notify Symfony that it is a "listener" on the ``kernel.exception `` event by
72
78
using a special "tag":
@@ -187,12 +193,6 @@ listen to the same ``kernel.exception`` event::
187
193
That's it! Your ``services.yaml `` file should already be setup to load services from
188
194
the ``EventSubscriber `` directory. Symfony takes care of the rest.
189
195
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
-
196
196
.. _ref-event-subscriber-configuration :
197
197
198
198
.. tip ::
You can’t perform that action at this time.
0 commit comments