Skip to content

Commit 185d514

Browse files
committed
Update install instructions
* Include `--dev` in require commands * Use the full term `global` instead of the shorthand `g` * Mirror "Installation" section structure to the structure on WordPress/WordPress-Coding-Standards
1 parent 88a55f8 commit 185d514

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,29 @@ Go to https://docs.wpvip.com/technical-references/code-review/phpcs-report/ to l
2323

2424
## Installation
2525

26-
To install the VIP Coding Standards, run:
27-
```bash
28-
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
29-
composer require automattic/vipwpcs
30-
```
26+
[Composer](https://getcomposer.org/) will install the latest compatible versions of PHPCS, PHPCSUtils, PHPCSExtra, WPCS and VariableAnalysis and register the external standards with PHP_CodeSniffer.
27+
28+
Please refer to the [installation instructions for installing PHP_CodeSniffer for WordPress.com VIP](https://docs.wpvip.com/how-tos/code-review/php_codesniffer/) for more details.
29+
30+
As of VIPCS version 2.3.0, there is no need to `require` the [PHP_CodeSniffer Standards Composer Installer Plugin](https://github.com/PHPCSStandards/composer-installer) anymore as it is now a requirement of VIPCS itself. Permission to run the plugin will still need to be granted though when using Composer 2.2 or higher.
31+
32+
### Composer Project-based Installation
33+
34+
To install the VIP Coding Standards, run the following from the root of your project:
3135

32-
or if installing globally:
3336
```bash
34-
composer g config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
35-
composer g require automattic/vipwpcs
37+
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
38+
composer require --dev automattic/vipwpcs
3639
```
3740

38-
This will install the latest compatible versions of PHPCS, PHPCSUtils, PHPCSExtra, WPCS and VariableAnalysis and register the external standards with PHP_CodeSniffer.
41+
## Composer Global Installation
3942

40-
Please refer to the [installation instructions for installing PHP_CodeSniffer for WordPress.com VIP](https://docs.wpvip.com/how-tos/code-review/php_codesniffer/) for more details.
43+
Alternatively, it can be installed standard globally for use across multiple projects:
4144

42-
As of VIPCS version 2.3.0, there is no need to `require` the [PHP_CodeSniffer Standards Composer Installer Plugin](https://github.com/PHPCSStandards/composer-installer) anymore as it is now a requirement of VIPCS itself. Permission to run the plugin will still need to be granted though when using Composer 2.2 or higher.
45+
```bash
46+
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
47+
composer global require --dev automattic/vipwpcs
48+
```
4349

4450
## Contribution
4551

0 commit comments

Comments
 (0)