Skip to content

Commit e86ba1c

Browse files
committed
Wiki/Requirements: add links to the docs for each PHP extension
1 parent b0fb2a2 commit e86ba1c

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

wiki/Requirements.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
1-
PHP_CodeSniffer 4.x requires PHP 7.2.0 or greater.
1+
PHP_CodeSniffer 4.x requires PHP 7.2.0 or greater.
22
_Prior to PHP_CodeSniffer 4.0.0, the minimum PHP requirement was 5.4.0._
33

44
Additionally, PHP_CodeSniffer requires the following PHP extensions to be enabled:
5-
- Tokenizer: used by the core tokenizer to process PHP files
6-
- SimpleXML: used to process ruleset XML files
7-
- XMLWriter: used to create some report formats
5+
- [Tokenizer][tokenizer]: used by the core tokenizer to process PHP files
6+
- [SimpleXML][simplexml]: used to process ruleset XML files
7+
- [XMLWriter][xmlwriter]: used to create some report formats
88

99
The following PHP extensions are not required, but are strongly recommended:
10-
- 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.
10+
- [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][pcntl]: required for parallel processing via the `--parallel` CLI option. Without this extension, PHP_CodeSniffer will not be able to check multiple files simultaneously.
1212

1313
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.
1414

1515
> [!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:
16+
> The [gRPC PHP extension][grpc] 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:
1717
> ```text
1818
> phpcs -d grpc.enable_fork_support=1 -d grpc.poll_strategy=epoll1 [other options] <file|directory>
1919
> ```
20+
21+
[grpc]: https://grpc.io/docs/languages/php/
22+
[iconv]: https://www.php.net/book.iconv
23+
[pcntl]: https://www.php.net/book.pcntl
24+
[simplexml]: https://www.php.net/book.simplexml
25+
[tokenizer]: https://www.php.net/book.tokenizer
26+
[xmlwriter]: https://www.php.net/book.xmlwriter

0 commit comments

Comments
 (0)