composer require --dev creatuity/magento-quality-tools
DO NOT create a grumphp.yml
file in the root directory when you will be prompted
Add the following to your composer.json
"extra": {
"grumphp": {
"config-default-path": "vendor/creatuity/magento-quality-tools/src/grumphp.yml"
}
}
According to the issue with Magento Coding Standard package it's also needed to add this to your composer.json
file
"scripts": {
"post-install-cmd": [
"([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/,../../phpcompatibility/php-compatibility)"
]
},
and run composer install
to apply the changes.
./vendor/bin/grumphp git:pre-commit
to run tasks defined in grumphp.yml
only on the code from the commit.
This command will be also run when you try to do a commit - it uses git pre-commit hook.
This package has pre-defined configuration of grumphp.yml
file, thanks for that you can install
and just use it. Currently, the package contains these tasks :
[PROJECTX-123] Test commit
hotfix|bugfix|feature
prefix and contains a task number and short description, example -
feature/PROJECTX-short-description
release/0.1.1
var_dump
or console.log
Warning: class_implements(): Class Vendor\Module\Setup\Patch\Data\ExamplePatch does not exist and could not be loaded in /dev/tests/static/framework/Magento/CodeMessDetector/Rule/Design/AllPurposeAction.php on line 35
check this issue on the Github https://github.com/magento/magento2/issues/33430