Skip to content

Commit d323dc1

Browse files
authored
Merge pull request #808 from Automattic/docs/install-update
Docs/install update
2 parents d388671 + 26312cf commit d323dc1

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
@@ -24,23 +24,29 @@ Go to https://docs.wpvip.com/technical-references/code-review/phpcs-report/ to l
2424

2525
## Installation
2626

27-
To install the VIP Coding Standards, run:
28-
```bash
29-
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
30-
composer require automattic/vipwpcs
31-
```
27+
[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.
28+
29+
Please refer to the [installation instructions for installing PHP_CodeSniffer for WordPress VIP](https://docs.wpvip.com/how-tos/code-review/php_codesniffer/) for more details.
30+
31+
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.
32+
33+
### Composer Project-based Installation
34+
35+
To install the VIP Coding Standards, run the following from the root of your project:
3236

33-
or if installing globally:
3437
```bash
35-
composer g config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
36-
composer g require automattic/vipwpcs
38+
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
39+
composer require --dev automattic/vipwpcs
3740
```
3841

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

41-
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.
44+
Alternatively, it can be installed standard globally for use across multiple projects:
4245

43-
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.
46+
```bash
47+
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
48+
composer global require --dev automattic/vipwpcs
49+
```
4450

4551
## Contribution
4652

0 commit comments

Comments
 (0)