WPTT / WPThemeReview

PHP_CodeSniffer rules (sniffs) to enforce WordPress theme review coding conventions
MIT License
208 stars 38 forks source link

Add PHPCompatibilityWP to the ruleset #173

Closed jrfnl closed 5 years ago

jrfnl commented 6 years ago

Once the repo has been deforked - see #169 -, the Theme Review project is free to have different dependencies than WPCS has.

This means that it will become possible to add checks for PHP cross-version compatibility using the external PHPCompatibilityWP PHPCS ruleset, which will also be used in the Tide project.

Notes for implementation:

It would be great if we could detect a potential Requires PHP header in the style.css file and use that to set the testVersion for the PHPCompatibilityWP sniffs.

If no Requires PHP header is found, the WP standard of supporting PHP 5.2 and higher should be presumed.