Skip to content

Commit 40a6cc4

Browse files
committed
minor #18438 [Console] Add SignalMap to map signal value to its name (alexandre-daubois)
This PR was merged into the 6.4 branch. Discussion ---------- [Console] Add SignalMap to map signal value to its name Fix #18435 Commits ------- 3922fff [Console] Add SignalMap to map signal value to its name
2 parents 6bebf68 + 3922fff commit 40a6cc4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

components/console/events.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,18 @@ Symfony doesn't handle any signal received by the command (not even ``SIGKILL``,
243243
``SIGTERM``, etc). This behavior is intended, as it gives you the flexibility to
244244
handle all signals e.g. to do some tasks before terminating the command.
245245

246+
.. tip::
247+
248+
If you need to fetch the signal name from its integer value (e.g. for logging),
249+
you can use the
250+
:method:`Symfony\\Component\\Console\\SignalRegistry\\SignalMap::getSignalName`
251+
method.
252+
253+
.. versionadded:: 6.4
254+
255+
The :class:`Symfony\\Component\\Console\\SignalRegistry\\SignalMap` class was
256+
introduced in Symfony 6.4.
257+
246258
.. deprecated:: 6.3
247259

248260
In Symfony versions previous to 6.3, all signals (except ``SIGUSR1`` and

0 commit comments

Comments
 (0)