Conversation
The gRPC PHP extension is known to cause PHP_CodeSniffer to hang when running with parallel processing enabled. Refs PHPCSStandards/PHP_CodeSniffer 294
|
=== This is an auto-generated comment === Thank you for your PR. Please review the resulting final markdown files via the created artifact. N.B.: the above link will automatically be updated when this PR is updated. |
jrfnl
left a comment
There was a problem hiding this comment.
LGTM! Thanks @rodrigoprimo !
P.S.: I'll hold off on merging for the moment until you've had a chance to read the discussion between @fredden and me in PHPCSStandards/PHP_CodeSniffer#1388 and indicated how you want to move forward in light of that.
wiki/Requirements.md
Outdated
| - PCNTL: required for parallel processing via the `--parallel` CLI option. Without this extension, PHP_CodeSniffer will not be able to check multiple files simultaneously. | ||
|
|
||
| > [!WARNING] | ||
| > The gRPC PHP extension is known to cause PHP_CodeSniffer to hang when running with parallel processing enabled. If the gRPC extension is loaded, make sure the `grpc.enable_fork_support` and `grpc.poll_strategy` ini settings are properly configured. See [this comment](https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/294#issuecomment-1906558549) for more details. |
There was a problem hiding this comment.
Hmm... looking at this again now, I think it would be better for the docs to include the information for which you now point to an issue.
What do you think ?
There was a problem hiding this comment.
How do I configure these settings "properly"? I think the documentation should include that part as well.
There was a problem hiding this comment.
I think that is a good idea, @jrfnl! I've updated the warning to include the workaround directly in the text instead of pointing to the issue.
I used ```text instead of ```bash for the code block as the latter highlights <file|directory> which is not helpful in my opinion for this particular case.
The phpcs command added here triggered a cspell error. I opted to update the cspell markdown_code_block regex pattern to also ignore code blocks inside blockquotes. The previous pattern only matched code blocks starting with optional whitespace, so it didn't match the > ``` syntax used in this warning. Let me know if you prefer a different approach, such as applying this fix in a separate PR or simply adding the word that triggers the error to the allowlist.
|
Personally, I probably wouldn't have seen that information, at least not without a lot of digging. Someone setting up PHPCS will most likely only read the README by scrolling down at https://github.com/PHPCSStandards/PHP_CodeSniffer. In order to get to the updated info on PHP extensions, you have to click the "GitHub wiki" link in the Documentation section, which is pretty generic (and then they have to arrive at the specific section). Perhaps a note pointing to the PHP extension info could be added in the Requirements section of the README? That definitely would have helped me. |
…instead of pointing to the issue
e627dec to
a4120b0
Compare
…instead of pointing to the issue I opted to use "```text" instead of "```bash" as the latter highlights only "<file|directory>" which I don't think helps in this case.
The existing regex pattern for ignoring code blocks only matched blocks at the start of a line (with optional whitespace). This update makes it also match code blocks inside markdown blockquotes, where lines are prefixed with `>`.
876308e to
bdd42b4
Compare
I think that is a good idea, @mbomb007. I created PHPCSStandards/PHP_CodeSniffer#1393 to discuss how to address your suggestion. |
Description
Follow-up to #91.
This PR introduces two changes to the Requirements wiki page:
--parallelCLI option.Related issues/external references
--parallelPHP_CodeSniffer#294PR checklist
_Sidebar.mdfile.