Skip to content

Commit 4c82b26

Browse files
Mention PCNTL extension installation
1 parent 3ace890 commit 4c82b26

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

components/console/events.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ Listeners receive a
152152
It is then dispatched just after the ``ConsoleEvents::ERROR`` event.
153153
The exit code received in this case is the exception code.
154154

155+
.. _console_signal-event:
156+
155157
The ``ConsoleEvents::SIGNAL`` Event
156158
-----------------------------------
157159

@@ -184,7 +186,8 @@ Listeners receive a
184186
.. tip::
185187

186188
All the available signals (``SIGINT``, ``SIGQUIT``, etc.) are defined as
187-
`constants of the PCNTL PHP extension`_.
189+
`constants of the PCNTL PHP extension`_. The extension has to be installed
190+
for these constants to be available.
188191

189192
If you use the Console component inside a Symfony application, commands can
190193
handle signals themselves. To do so, implement the

components/lock.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,11 @@ Lock will be released automatically as soon as one process finishes::
269269
}
270270
// ...
271271

272+
.. note::
273+
274+
In order for the above example to work, the `PCNTL`_ extension must be
275+
installed.
276+
272277
To disable this behavior, set the ``autoRelease`` argument of
273278
``LockFactory::createLock()`` to ``false``. That will make the lock acquired
274279
for 3600 seconds or until ``Lock::release()`` is called::
@@ -1074,3 +1079,4 @@ are still running.
10741079
.. _`ZooKeeper`: https://zookeeper.apache.org/
10751080
.. _`readers-writer lock`: https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock
10761081
.. _`priority policy`: https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock#Priority_policies
1082+
.. _`PCNTL`: https://www.php.net/manual/book.pcntl.php

setup.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ Before creating your first Symfony application you must:
2222

2323
Optionally, you can also `install Symfony CLI`_. This creates a binary called
2424
``symfony`` that provides all the tools you need to develop and run your
25-
Symfony application locally.
25+
Symfony application locally. Also, you may install the `PCNTL`_ extension to
26+
use some features like signal handling in
27+
:doc:`the Messenger component </messenger>` and when using
28+
:ref:`signals in commands <console_signal-event>`.
2629

2730
The ``symfony`` binary also provides a tool to check if your computer meets all
2831
requirements. Open your console terminal and run this command:
@@ -329,3 +332,4 @@ Learn More
329332
.. _`Tokenizer`: https://www.php.net/book.tokenizer
330333
.. _`SimpleXML`: https://www.php.net/book.simplexml
331334
.. _`PCRE`: https://www.php.net/book.pcre
335+
.. _`PCNTL`: https://www.php.net/manual/book.pcntl.php

0 commit comments

Comments
 (0)