Commit 4b46a35
committed
Add the PHPCompatibility PHPCS standard
The PHPCompatibility standard is a set of sniffs which can scan a code base for a lot of typical PHP cross-version incompatibilities.
The standard works best when a [`testVersion` configuration variable](https://github.com/PHPCompatibility/PHPCompatibility/#sniffing-your-code-for-compatibility-with-specific-php-versions) is set for the package using the standard.
As this standard is used by different repos with different requirements, this `testVersion` should be set in the repos _using_ this standard, not in the `ruleset.xml` for this standard.
Now, there are several libraries available in the PHP world which offer polyfills for select PHP functionality. If any of these libraries are used, PHPCompatibility may throw false positives for polyfilled functionality.
To prevent receiving these false positives, a number of PHPCompatibility rulesets are available which each take a specific polyfill into account. These rulesets are non-conflicting and can be used in combination.
As some of the packages using this standard use these kind of polyfills, I'm adding the `PHPCompatibilityAll` package to ensure that all PHPCompatibility rulesets are available.
Repos using this package can then pick and choose to add any of the polyfill exclusion rulesets at will.
Refs:
* https://github.com/PHPCompatibility/PHPCompatibility/
* https://github.com/PHPCompatibility/PHPCompatibilityAll1 parent f8c5889 commit 4b46a35
3 files changed
+418
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
0 commit comments