Commit a025c6d
committed
Composer: make PHP extension dependencies explicit
PR 1856, which was included in WPCS 2.3.0, introduced a check for strings wrapped in HTML in the `WordPress.WP.I18n` sniff.
The underlying code for this check uses the PHP XMLReader extension unconditionally.
This means that the PHP [`XMLReader` extension](https://www.php.net/manual/en/xmlreader.installation.php) and `libxml` are hard requirements for WPCS, but this was not yet annotated as such in the `composer.json` `require` section.
Along the same lines, `iconv` is used conditionally in the `PrefixAllGlobals` sniff, so should be listed as `suggest`.
And well, the dependency on the Tokenizer extension should be obvious ;-)
Fixed now.
Checked using the ComposerRequireChecker tooling: https://github.com/maglnet/ComposerRequireChecker
Note: as this tool relies on an `autoload` requirement in the `composer.json` file, we cannot add it to CI as we use the PHPCS autoloader and should not have the `autoload` directive in our `composer.json` to prevent interference.1 parent efbaa1d commit a025c6d
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
0 commit comments