jalogut / magento2-grumphp-conventions-checker
Magento2 Grumphp Conventions Checker
2.2.2
2018-06-13 15:50 UTC
Requires
- phpmd/phpmd: ^2.6
- phpro/grumphp: ^0.14
- squizlabs/php_codesniffer: ~3.2.2
This package is auto-updated.
Last update: 2024-12-17 21:29:11 UTC
README
Installation
Project
composer require --dev "jalogut/magento2-grumphp-conventions-checker:^2.2"
- Create
grumphp.yml
file in the root folder with the following content:
parameters:
magento_dir: <magento_dir>
vendor_dir: <vendor_dir>
imports:
- { resource: <vendor_dir>/jalogut/magento2-grumphp-conventions-checker/magento2-project-grumphp.yml }
- Add the following scripts in your
composer.json
"scripts": {
"grumphpInitProject": "[ ! -e bin/grumphp ] || [ ! -e <vendor_dir>/jalogut/magento2-grumphp-conventions-checker ] || bin/grumphp git:init",
"grumphpInitModules": "[ ! -e bin/grumphp ] || [ ! -e <vendor_dir>/jalogut/magento2-grumphp-conventions-checker ] || find <vendor_dir>/<company_vendor_name>/* -type f -name grumphp.yml -maxdepth 1 -exec dirname {} \\; | xargs -I{} bash -c \"cd '{}' && ../../../../bin/grumphp git:init\"",
"pre-autoload-dump": [
"mkdir -p <magento_dir>/app/etc && cp <vendor_dir>/magento/magento2-base/app/etc/NonComposerComponentRegistration.php <magento_dir>/app/etc/NonComposerComponentRegistration.php"
],
"post-install-cmd": [
"@grumphpInitProject",
"@grumphpInitModules"
],
"post-update-cmd": [
"@grumphpInitProject",
"@grumphpInitModules"
]
}
NOTE: replace <vendor_dir>
, <company_vendor_name>
and <magento_dir>
according to your configuration
Magento Common Module
- Create
grumphp.yml
file in the root folder with the following content:
parameters:
magento_dir: <magento_dir>
vendor_dir: <vendor_dir>
imports:
- { resource: ../../jalogut/magento2-grumphp-conventions-checker/magento2-module-grumphp.yml }
NOTE: replace <vendor_dir>
and <magento_dir>
according to your configuration
Prerequisites
- MAGENTO >= 2.2.2
Developers
Licence
GNU General Public License, version 3 (GPLv3)
Copyright
(c) Juan Alonso juan.jalogut@gmail.com