Skip to content

Commit 261cb4a

Browse files
authored
Merge pull request #583 from Automattic/feature/require-dealerdirect-plugin
Composer: require the DealerDirect plugin
2 parents 412ba54 + 12f2c9b commit 261cb4a

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This project contains two rulesets:
99

1010
These rulesets contain only the rules which are considered to be "errors" and "warnings" according to the [WordPress VIP Go documentation](https://wpvip.com/documentation/vip-go/code-review-blockers-warnings-notices/)
1111

12-
The rulesets use rules from the [WordPress Coding Standards](https://github.com/WordPress/WordPress-Coding-Standards) (WPCS) project.
12+
The rulesets use rules from the [WordPress Coding Standards](https://github.com/WordPress/WordPress-Coding-Standards) (WPCS) project, as well as the [VariableAnalysis](https://github.com/sirbrillig/phpcs-variable-analysis) standard.
1313

1414
Go to https://wpvip.com/documentation/phpcs-review-feedback/ to learn about why violations are flagged as errors vs warnings and what the levels mean.
1515

@@ -18,20 +18,17 @@ Go to https://wpvip.com/documentation/phpcs-review-feedback/ to learn about why
1818
* PHP 5.4+
1919
* [PHPCS 3.5.5+](https://github.com/squizlabs/PHP_CodeSniffer/releases)
2020
* [WPCS 2.3.0+](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/releases)
21+
* [VariableAnalysis 2.8.3+](https://github.com/sirbrillig/phpcs-variable-analysis/releases)
2122

2223
## Installation
2324

2425
`composer require automattic/vipwpcs`, or `composer g require automattic/vipwpcs` if installing globally.
2526

26-
This will install the latest compatible versions of PHPCS and WPCS.
27+
This will install the latest compatible versions of PHPCS, WPCS and VariableAnalysis and register the external standards with PHP_CodeSniffer.
2728

2829
Please refer to the [installation instructions for installing PHP_CodeSniffer for WordPress.com VIP](https://wpvip.com/documentation/how-to-install-php-code-sniffer-for-wordpress-com-vip/) for more details.
2930

30-
We recommend the [PHP_CodeSniffer Standards Composer Installer Plugin](https://github.com/Dealerdirect/phpcodesniffer-composer-installer), which handles the registration of all of the installed standards, so there is no need to set the `installed_paths` config value manually, for single or multiple standards.
31-
32-
Alternatively, you should register the standard to PHPCS by appending the VIPCS directory to the end of the installed paths. e.g.
33-
34-
`phpcs --config-set installed_paths /path/to/wpcsstandard,path/to/vipcsstandard`
31+
As of VIPCS version 2.3.0, there is no need to `require` the [PHP_CodeSniffer Standards Composer Installer Plugin](https://github.com/Dealerdirect/phpcodesniffer-composer-installer) anymore as it is now a requirement of VIPCS itself.
3532

3633
## Contribution
3734

composer.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,15 @@
1616
],
1717
"require": {
1818
"php": ">=5.4",
19+
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7",
1920
"sirbrillig/phpcs-variable-analysis": "^2.8.3",
2021
"squizlabs/php_codesniffer": "^3.5.5",
2122
"wp-coding-standards/wpcs": "^2.3"
2223
},
2324
"require-dev": {
24-
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
2525
"phpcompatibility/php-compatibility": "^9",
2626
"phpunit/phpunit": "^4 || ^5 || ^6 || ^7"
2727
},
28-
"suggest": {
29-
"dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will manage the PHPCS 'installed_paths' automatically."
30-
},
3128
"scripts": {
3229
"install-codestandards": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run",
3330
"ruleset": "bin/ruleset-tests",

0 commit comments

Comments
 (0)