From b76ae4eafd6c00a0848dd1b430948948fef06aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Niederges=C3=A4=C3=9F?= Date: Mon, 8 Apr 2019 09:45:10 +0200 Subject: [PATCH] Updated README.md regarding adding standards only in dev The post-(install|update)-cmd should be only executed when we are in dev mode of composer. There is an environment variable definded ($COMPOSER_DEV_MODE) for this. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e7099ef2..c0792516 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,12 @@ Due to security, when installed this way the Magento standard for phpcs cannot b You can achieve this by adding the following to your project's `composer.json`: ```` "scripts": { - "post-install-cmd": "vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/", - "post-update-cmd": "vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/" + "post-install-cmd": [ + "[ $COMPOSER_DEV_MODE -eq 1 ] && vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/" + ], + "post-update-cmd": [ + "[ $COMPOSER_DEV_MODE -eq 1 ] && vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/" + ] } ````