{"id":18766282,"url":"https://github.com/milindsingh/magento2-grumphp","last_synced_at":"2026-01-27T10:32:48.562Z","repository":{"id":45711098,"uuid":"266472378","full_name":"milindsingh/magento2-grumphp","owner":"milindsingh","description":"Ultimate GrumPHP configuration for Magento 2 automated code quality checks","archived":false,"fork":false,"pushed_at":"2021-03-06T17:03:38.000Z","size":17,"stargazers_count":11,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-19T13:44:35.636Z","etag":null,"topics":["automation","config","configuration","grumphp","grumphp-configuration","magento2","magento2-grumphp","module","php-codesniffer","phpcs","quality-control"],"latest_commit_sha":null,"homepage":"https://adapttive.com/blog/grumphp-in-magento-2","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/milindsingh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-24T04:56:01.000Z","updated_at":"2023-10-09T10:04:22.000Z","dependencies_parsed_at":"2022-07-30T12:17:59.425Z","dependency_job_id":null,"html_url":"https://github.com/milindsingh/magento2-grumphp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/milindsingh/magento2-grumphp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milindsingh%2Fmagento2-grumphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milindsingh%2Fmagento2-grumphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milindsingh%2Fmagento2-grumphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milindsingh%2Fmagento2-grumphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milindsingh","download_url":"https://codeload.github.com/milindsingh/magento2-grumphp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milindsingh%2Fmagento2-grumphp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28811942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","config","configuration","grumphp","grumphp-configuration","magento2","magento2-grumphp","module","php-codesniffer","phpcs","quality-control"],"created_at":"2024-11-07T18:39:58.642Z","updated_at":"2026-01-27T10:32:48.544Z","avatar_url":"https://github.com/milindsingh.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Magento2 GrumPHP\nGrumPHP configuration for Magento 2 Module Automated Quality Check\n\n## What is GrumPHP ?\n\n- [GrumPHP](https://github.com/phpro/grumphp) has a set of common tasks built-in.\n\n- GrumPHP will run some tests on the committed code. If the tests fail, you won't be able to commit your changes.\n\n- This handy tool will not only improve your codebase, it will also teach your co-workers to write better code following the best practices you've determined as a team.\n\n- GrumPHP can be configured at 2 levels:\n    \n   + module level (`magento-2-root/app/code/MyVendor/MyModule`).\n   \n   + project level (`magento-2-root`).\n\n## Setup\n\n1. Install GrumPHP by running `composer require --dev phpro/grumphp` or `composer global require --dev phpro/grumphp`\n\n2. GrumPHP can monitor each git repository push action by initializing it in the repository. \n   \n  Goto the module directory and Run: `php vendor/bin/grumphp git:init` or `grumphp git:init`\n\n3. GrumPHP is a task runner and all task needs to be defined via `grumphp.yml` file in the module directory (`app/code/MyVendor/MyModule`) for module level configuration.\n Use the below example to start with:\n\n```yaml\ngrumphp:\n  hide_circumvention_tip: true\n  process_timeout: 120\n  tasks:\n    composer:\n      file: ./composer.json\n      no_check_all: true\n      no_check_lock: false\n      no_check_publish: false\n      with_dependencies: false\n      strict: false\n    git_blacklist:\n      keywords:\n        - \"die(\"\n        - \"var_dump(\"\n        - \"print_r(\"\n        - \"exit;\"\n        - \"console.log\"\n        - \"_objectManager\"\n        - \"ObjectManagerInterface\"\n    phpcs:\n      standard: Magento2\n      tab_width: 4\n      severity: 10\n      error_severity: 10\n      warning_severity: ~\n      report: full\n      triggered_by: [phtml, php]\n    phpcsfixer2:\n      allow_risky: ~\n      cache_file: ~\n      config: '../../../../.php_cs.dist'\n      using_cache: ~\n      verbose: true\n      config_contains_finder: false\n      triggered_by: ['php', 'phtml']\n\n#    phpmd:\n#      ruleset: ['%magento_dir%/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml']\n#    phpstan:\n#      autoload_file: ~\n#      configuration: ~\n#      level: 0\n#      force_patterns: []\n#      ignore_patterns: []\n#      triggered_by: ['php']\n#      memory_limit: \"-1\"\n```\n\n4. Add bin path (`magento2-root/vendor/bin`) to `composer.json`: \n```json\n{\n    \"config\": {\n            \"bin-dir\": \"../../../../vendor/bin\"\n        }\n}\n```\n\n5. Test by running `php ../../../../vendor/bin/grumphp run` or `grumphp run`\n\n## Dependencies\n    \n#### 1. PHPCS\n\n- Goto Magento2 root run following commands:\n\n- Install [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) (skip if already installed) : `composer require --dev \"squizlabs/php_codesniffer=*\"`\n\n- Install [Magento2 coding standard](https://github.com/magento/magento-coding-standard) :\n  \n  `composer require --dev magento/magento-coding-standard`\n  \n- Set Magento2 Standard in PHP CodeSniffer available standards:\n\n  `phpcs --config-set installed_paths ../../magento/magento-coding-standard/`\n\n\n#### 2. PHPCS FIXER 2\n\n- Install [PHP Coding Standards Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (skip if already installed) :\n \n  `composer require --dev friendsofphp/php-cs-fixer`\n\n#### 3. PHPMD\n\n#### 4. PHPSTAN\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilindsingh%2Fmagento2-grumphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilindsingh%2Fmagento2-grumphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilindsingh%2Fmagento2-grumphp/lists"}