Skip to content

[Console] Dispatch ConsoleTerminateEvent when exiting on signal #19017

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 2 commits into from
Oct 13, 2023
Merged
Changes from 1 commit
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
11 changes: 11 additions & 0 deletions components/console/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,17 @@ Listeners receive a
It is then dispatched just after the ``ConsoleEvents::ERROR`` event.
The exit code received in this case is the exception code.

Additionally, the event is dispatched when the command is being exited on
a signal. You can learn more about signals in the
:ref:`the dedicated section <console-events_signal>`.

.. versionadded:: 6.4

The dispatching of the ``ConsoleEvents::TERMINATE`` event on exit
signal was introduced in Symfony 6.4.

.. _console-events_signal:

The ``ConsoleEvents::SIGNAL`` Event
-----------------------------------

Expand Down