WPTT / WPThemeReview

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

Ruleset: add the PHPCompatibilityWP standard #177

Closed jrfnl closed 5 years ago

jrfnl commented 5 years ago

This currently presumes that all themes should be compatible with PHP 5.2-nightly.

At a later point in time, we may be able to make this more configurable by reading out the Requires PHP: header in the style.css file and, if found, using the minimum PHP version set there for the bottom limit in testVersion.

For now, the testVersion as set in the ruleset can be overruled from the command-line by passing a testVersion as a command-line parameter, like so: phpcs ... --runtime-set testVersion 5.4-.

Fixes #173