Skip to main content
1 of 2
Pradeep Kumar
  • 8.8k
  • 12
  • 62
  • 86

i followed below steps in windows local system first installed xammp

  1. cd C:\xampp\php
  2. pear install PHP_CodeSniffer pear install --alldeps PHP_CodeSniffer

(if there is any issue run cmd as Administrator)

enter image description here

phpcs -i

  1. then to follow Magento coding install magento-ecg/coding-standard throw composer

  2. after install it will be in \C:\xampp\htdocs\magento217\vendor\magento-ecg\

  3. now run (C:\xampp\php>) phpcs --config-set installed_paths \C:\xampp\htdocs\magento217\vendor\magento-ecg\coding-standard

now it will have all plugins need for M2

phpcs -i

The installed coding standards are PSR1, PSR2, PEAR, MySource, PHPCS, Zend, Squiz, Ecg and EcgM2

Pradeep Kumar
  • 8.8k
  • 12
  • 62
  • 86