From cb7117a40891573e541f4cc9b2796de5892740ae Mon Sep 17 00:00:00 2001 From: jrfnl Date: Tue, 27 Feb 2018 10:49:06 +0100 Subject: [PATCH] :wrench: PHPCS: add a comprehensive PHPCompatibility exceptions ruleset WordPress provides backfills for a number of PHP native functions and constants. These can therefore be safely used in themes and plugins. This commit adds a whitelist for the PHPCompatibility ruleset of the backfills currently provided by WP. N.B.: At this moment, none of the whitelisted classes/constants/functions/interfaces are used in `_s`. However, `_s` is also a teaching tool and an example for others, so having this whitelist block in there serves that purpose and allows for themes which are build onto `_s` to use these PHP features without having to worry about cross-version compatibility notices. --- phpcs.xml.dist | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 66317a71..ad4fab4c 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -103,5 +103,34 @@ - + + + + + + + + + + + + + + + + + + + + + + + +