Skip to content

Commit b0fb2a2

Browse files
authored
Add pcntl and grpc docs (#95)
* Requirements: document PCNTL as a recommended PHP extension * Requirements: add warning about gRPC extension and parallel processing The gRPC PHP extension is known to cause PHP_CodeSniffer to hang when running with parallel processing enabled. Includes details on how to handle the gRPC extension. Refs: PHPCSStandards/PHP_CodeSniffer#294 * Spellcheck: also ignore code blocks inside blockquotes 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 `>`.
1 parent 4615316 commit b0fb2a2

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

.cspell.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ patterns:
1212
- name: markdown_code_block
1313
pattern: |
1414
/
15-
^(\s*`{3,})[a-z]+ # match the ``` with a language modifier
16-
[\s\S]*? # the block of code
17-
^\1 # end of the block
15+
^([\s>]*`{3,})[a-z]+ # match the ``` with a language modifier, optionally inside a blockquote
16+
[\s\S]*? # the block of code
17+
^\1 # end of the block
1818
/gmx
1919
- name: markdown_inline_code
2020
pattern: /(\s*`)[^`\n]{3,}`/gmx

wiki/Requirements.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ Additionally, PHP_CodeSniffer requires the following PHP extensions to be enable
66
- SimpleXML: used to process ruleset XML files
77
- XMLWriter: used to create some report formats
88

9-
The following PHP extension is not required, but is strongly recommended:
9+
The following PHP extensions are not required, but are strongly recommended:
1010
- iconv: used for accurate character length calculation in files containing multibyte characters. Without this extension, some sniffs, like `Generic.Files.LineLength`, may report incorrect results for lines containing non-ASCII characters, as PHP_CodeSniffer will fall back to byte-based length calculations.
11+
- PCNTL: required for parallel processing via the `--parallel` CLI option. Without this extension, PHP_CodeSniffer will not be able to check multiple files simultaneously.
1112

1213
Individual sniffs may have additional requirements such as external applications and scripts. See the [Configuration Options](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Configuration-Options) manual page for a list of these requirements.
14+
15+
> [!WARNING]
16+
> The gRPC PHP extension is known to cause PHP_CodeSniffer to hang when running with parallel processing enabled. If the gRPC extension is loaded, either do not use the `--parallel` CLI option or configure the extension's ini settings as follows:
17+
> ```text
18+
> phpcs -d grpc.enable_fork_support=1 -d grpc.poll_strategy=epoll1 [other options] <file|directory>
19+
> ```

0 commit comments

Comments
 (0)