Description
We have several places where we are using the PCNTL extension. Recently, some PRs were created to check if the functions or constants provided by this extension are available before trying to use them (by instance, symfony/symfony#51791).
Searching in the codebase and the docs, I don't see any clear insight about the requirement for the extension.
Docs:
- https://github.com/search?q=repo%3Asymfony%2Fsymfony-docs%20pcntl&type=code
- https://github.com/search?q=org%3Asymfony+pcntl+language%3AMarkdown&type=code
Composer suggestions:
Additionally, there are some reports about issues generated by containers compiled with different setups between the cli
and the other PHP SAPIs, where the cli
SAPI was including the extension and the other did not: symfony/symfony#37005.
Considering this sentence in the extension documentation, having the extension enabled only in the cli
SAPI seems legit:
Process Control should not be enabled within a web server environment and unexpected results may happen if any Process Control functions are used within a web server environment.
Based on this, I think we should provide clear instructions about how to proceed regarding this extension for the most common use cases.