From 0e31c717fb89840640e73e5147653852f34a9724 Mon Sep 17 00:00:00 2001 From: Maciej Lewkowicz Date: Mon, 4 Mar 2019 13:33:17 +0100 Subject: [PATCH 1/2] Add Composer package type --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 5c66d7d..87a9856 100644 --- a/composer.json +++ b/composer.json @@ -3,6 +3,7 @@ "description": "A set of PHP_CodeSniffer rules and sniffs.", "homepage": "https://github.com/magento-ecg/coding-standard", "license": "MIT", + "type": "phpcodesniffer-standard", "authors": [ { "name": "Magento Expert Consulting Group", From f9575bd9c842a6c212e7a1cdf95206a686fa0e40 Mon Sep 17 00:00:00 2001 From: Maciej Lewkowicz Date: Mon, 4 Mar 2019 14:35:27 +0100 Subject: [PATCH 2/2] Update usage information in README --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8dce51c..92f2d28 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,9 @@ $ phpcs --standard=./vendor/magento-ecg/coding-standard/Ecg /path/to/code $ phpcs --standard=./vendor/magento-ecg/coding-standard/EcgM2 /path/to/code ``` -As a one time thing, you can add the ECG standards directory to PHP_CodeSniffer's installed paths: +This package is compatible with Composer Installer Plugins for PHPCS coding standards (such as https://github.com/Dealerdirect/phpcodesniffer-composer-installer) and can be automatically registered with PHPCS during installation. + +Alternatively, you can manually add the ECG standards directory to PHP_CodeSniffer's installed paths: ```sh $ phpcs --config-set installed_paths /path/to/your/folder/vendor/magento-ecg/coding-standard ```