Skip to content

Commit c25442c

Browse files
committed
Minor reword
1 parent 9decb27 commit c25442c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

event_dispatcher.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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+
7076
Now that the class is created, you need to register it as a service and
7177
notify Symfony that it is a "listener" on the ``kernel.exception`` event by
7278
using a special "tag":
@@ -187,12 +193,6 @@ listen to the same ``kernel.exception`` event::
187193
That's it! Your ``services.yaml`` file should already be setup to load services from
188194
the ``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::

0 commit comments

Comments
 (0)