-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Docs about PCNTL extension #19006
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
Comments
I tried to add a few things in the doc about it, hope this helps π |
Hi @alexandre-daubois! I think this helps, but IMO, we should be clear about our position regarding the extension availability and configuration.
WDYT? |
Adding it to the I'm not sure about the configuration of the extension however. I don't think we'd like to write (and maintain) documentation that belongs to other libraries and packages. It is not related to Symfony directly. This is just my opinion, and I think we should ask @javiereguiluz and @OskarStark on this point π |
I'll try to provide the PRs today.
I'm not suggesting to write docs about how the extension works, but about the proper configuration in a Symfony app, regarding the potential issues in compiled containers shared between multiple SAPIs. |
For the record, we ruled out "suggest" entries from composer.json files (too much maintenance burden). |
It's not just about the maintenance; it's also about the low value those suggestions have. |
@alexandre-daubois, do you think we have chance to prevent the usage of the extension on the web context? See this example. |
I'm not sure. The manual states that unexpected behavior may happen "if any Process Control functions are used within a web server environment". Only the usage if discouraged, not the installation of the extension. Also, the PHP setup is often the same between the CLI and the web env so I'm not sure we can really write something about this here π |
We've introduced one bug in a single release, which raises awareness of this extension. But I would say it generally shouldn't need such high level of awareness. You only need it, when you need it (i.e. when you rely on process signals). Symfony takes care of not using signal features when this extension is not available (except for this one case). If anything, we should look into improving our CI to make sure we run a job without the pcntl extension. Let's get the proposed PR merged π |
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:
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 thecli
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:Based on this, I think we should provide clear instructions about how to proceed regarding this extension for the most common use cases.
The text was updated successfully, but these errors were encountered: