Skip to content

[Console] add SignalableCommandInterface link #17172

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 1 commit into from
Aug 15, 2022
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
4 changes: 2 additions & 2 deletions components/console/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Listeners receive a

If you use the Console component inside a Symfony application, commands can
handle signals themselves. To do so, implement the
``SignalableCommandInterface`` and subscribe to one or more signals::
:class:`Symfony\\Component\\Console\\Command\\SignalableCommandInterface` and subscribe to one or more signals::

// src/Command/SomeCommand.php
namespace App\Command;
Expand All @@ -208,7 +208,7 @@ handle signals themselves. To do so, implement the
return [\SIGINT, \SIGTERM];
}

public function handleSignal(int $signal)
public function handleSignal(int $signal): void
{
if (\SIGINT === $signal) {
// ...
Expand Down