diff --git a/.travis.yml b/.travis.yml index 442c0ca..1aef2e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,8 +42,5 @@ script: - | # If we've set the $WP_TRAVISCI variable to run PHPCS, do that instead if [[ "$WP_TRAVISCI" == "phpcs" ]]; then - composer global require wp-coding-standards/wpcs - composer global require phpcompatibility/php-compatibility - ./vendor/bin/phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs,$HOME/.composer/vendor/phpcompatibility/php-compatibility ./vendor/bin/phpcs fi \ No newline at end of file diff --git a/composer.json b/composer.json index 5d69669..870db2f 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,11 @@ { - "require-dev": { - "squizlabs/php_codesniffer": "*", + "require-dev": { + "squizlabs/php_codesniffer": "*", "wp-coding-standards/wpcs": "*", "phpcompatibility/php-compatibility": "*" - } + }, + "scripts": { + "post-install-cmd": "\"vendor/bin/phpcs\" --config-set installed_paths vendor/wp-coding-standards/wpcs,vendor/phpcompatibility/php-compatibility", + "post-update-cmd": "\"vendor/bin/phpcs\" --config-set installed_paths vendor/wp-coding-standards/wpcs,vendor/phpcompatibility/php-compatibility" + } }