Skip to content

Commit

Permalink
Merge pull request #428 from pantheon-systems/use-php-compat-sniffs
Browse files Browse the repository at this point in the history
Use PHPCompatibility sniffs for PHP compat detection
  • Loading branch information
danielbachhuber authored Oct 27, 2019
2 parents 8a55548 + 579ed4e commit 218f68b
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 2 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"pantheon-systems/pantheon-wordpress-upstream-tests": "dev-master",
"wp-coding-standards/wpcs": "^2.1",
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
"phpunit/phpunit": "^6 || ^7"
"phpunit/phpunit": "^6 || ^7",
"phpcompatibility/php-compatibility": "^9.3"
},
"scripts": {
"lint": "@phpcs",
Expand Down
60 changes: 59 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

<rule ref="WordPress-Core" />
<rule ref="WordPress-Docs" />
<rule ref="PHPCompatibility"/>

<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php"/>
Expand All @@ -12,6 +13,10 @@
<!-- Show progress and sniff codes in all reports -->
<arg value="ps"/>

<!-- Minimum PHP and WP versions -->
<config name="testVersion" value="7.1-"/>
<config name="minimum_supported_wp_version" value="4.6"/>

<exclude-pattern>*/examples/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
Expand Down

0 comments on commit 218f68b

Please sign in to comment.