Skip to content

Commit 1db2835

Browse files
committed
Wiki/Requirements: add information on additional PHP extensions
Addresses some of the action points listed in PHPCSStandards/PHP_CodeSniffer 1392
1 parent e86ba1c commit 1db2835

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

wiki/Requirements.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ Additionally, PHP_CodeSniffer requires the following PHP extensions to be enable
55
- [Tokenizer][tokenizer]: used by the core tokenizer to process PHP files
66
- [SimpleXML][simplexml]: used to process ruleset XML files
77
- [XMLWriter][xmlwriter]: used to create some report formats
8+
- [libxml]: required by the SimpleXML and XMLWriter extensions
89

910
The following PHP extensions are not required, but are strongly recommended:
11+
- [DOM][dom]: used for displaying the sniff documentation via the `--generator=...` option.
1012
- [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.
13+
- [json]: required for the cache functionality, as well as for the JSON report output.
1114
- [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.
1215

1316
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.
@@ -18,8 +21,11 @@ Individual sniffs may have additional requirements such as external applications
1821
> phpcs -d grpc.enable_fork_support=1 -d grpc.poll_strategy=epoll1 [other options] <file|directory>
1922
> ```
2023
24+
[dom]: https://www.php.net/book.dom
2125
[grpc]: https://grpc.io/docs/languages/php/
2226
[iconv]: https://www.php.net/book.iconv
27+
[json]: https://www.php.net/book.json
28+
[libxml]: https://www.php.net/book.libxml
2329
[pcntl]: https://www.php.net/book.pcntl
2430
[simplexml]: https://www.php.net/book.simplexml
2531
[tokenizer]: https://www.php.net/book.tokenizer

0 commit comments

Comments
 (0)