A set of PHP Code Sniffer rules meant to ensure or increase the code quality of Magento 2 projects.
- Ensure that other dependencies of your project don't conflict with dependencies - e.g. if your project requires
"dealerdirect/phpcodesniffer-composer-installer": "^0.5"
, you can remove it (composer remove dealerdirect/phpcodesniffer-composer-installer
or a direct removal fromcomposer.json
) as this package will install a newer version - Run the following command:
composer require mrm-commerce/magento-coding-standard-phpcs
Ensure that you are running PHPCBF/PHPCS using the same PHP version that's used in your project. Some sniffs will detect your PHP version and will react accordingly.