infinum / eightshift-coding-standards

Eightshift coding standards for WordPress
https://eightshift.com
MIT License
16 stars 2 forks source link

Put dealerdirect/phpcodesniffer-composer-installer in suggestions #19

Closed dingo-d closed 5 years ago

dingo-d commented 5 years ago

The rationale for setting this in suggestions instead of required, or require dev is that someone may want to use our standard, but different package for sorting out composer installed paths.

"suggest": {
  "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
},

In this case I will need to add

"scripts": {
  "install-standards"    : "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --config-set installed_paths ../../..,../../infinum/coding-standards-wp",
  "install-standards-dev": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --config-set installed_paths ../../..,../../infinum/coding-standards-wp,../../phpcompatibility/php-compatibility",
  "post-install-cmd"     : "@install-standards-dev",
  "post-update-cmd"      : "@install-standards-dev"
},

So that the standards are loaded on composer install. This will have to be tested, especially in wp-boilerplate.

dingo-d commented 5 years ago

Fixed in the new release