Skip to content

Documentation for debug:event-dispatcher command #4319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions cookbook/service_container/event_listener.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,20 @@ done as follow::
Two types of request are available in the :class:`Symfony\\Component\\HttpKernel\\HttpKernelInterface`
interface: ``HttpKernelInterface::MASTER_REQUEST`` and
``HttpKernelInterface::SUB_REQUEST``.

Debugging Event Listeners
-------------------------

You can find out what listeners are registered in the event dispatcher
using the console. To show all events and their listeners, run:

.. code-block:: bash

$ php app/console debug:event-dispatcher

You can get registered listeners for a particular event by specifying
its name:

.. code-block:: bash

$ php app/console debug:event-dispatcher kernel.exception