{"id":16110831,"url":"https://github.com/roma-glushko/grumphp-magento2","last_synced_at":"2025-03-18T09:30:58.849Z","repository":{"id":62537078,"uuid":"208653064","full_name":"roma-glushko/grumphp-magento2","owner":"roma-glushko","description":"Magento 2 specific tasks for GrumPHP checker","archived":false,"fork":false,"pushed_at":"2020-09-07T15:08:15.000Z","size":40,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-28T08:33:55.448Z","etag":null,"topics":["grumphp-task","magento","magento2","static-analysis"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/roma-glushko.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":"2019-09-15T20:26:24.000Z","updated_at":"2020-09-07T15:06:51.000Z","dependencies_parsed_at":"2022-11-02T15:15:49.027Z","dependency_job_id":null,"html_url":"https://github.com/roma-glushko/grumphp-magento2","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roma-glushko%2Fgrumphp-magento2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roma-glushko%2Fgrumphp-magento2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roma-glushko%2Fgrumphp-magento2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roma-glushko%2Fgrumphp-magento2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roma-glushko","download_url":"https://codeload.github.com/roma-glushko/grumphp-magento2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243911160,"owners_count":20367637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["grumphp-task","magento","magento2","static-analysis"],"created_at":"2024-10-09T19:39:35.396Z","updated_at":"2025-03-18T09:30:58.315Z","avatar_url":"https://github.com/roma-glushko.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grumphp-magento2\n\n[![Latest Stable Version](https://poser.pugx.org/roma-glushko/grumphp-magento2/v/stable)](https://packagist.org/packages/roma-glushko/grumphp-magento2) [![License](https://poser.pugx.org/roma-glushko/grumphp-magento2/license)](https://packagist.org/packages/roma-glushko/grumphp-magento2)\n\n\nMagento 2 specific tasks for \u003ca href=\"https://github.com/phpro/grumphp\"\u003eGrumPHP\u003c/a\u003e checker\n\n## Installation\n\nThe easiest way to install this package is through composer:\n```bash\ncomposer require --dev roma-glushko/grumphp-magento2\n```\n\nAdd the extension loader to your `grumphp.yml`\n\n```yaml\nparameters:\n    extensions:\n        - Glushko\\GrumphpMagento2\\Extension\\Loader\n```\n\n## Usage\n\n### 🛠 MagentoModuleRegistration\n\nIt's a common practice to commit config.php file in Magento 2. Especially, the file is useful for managing modules. The common issue is when during development people forget to register newly added modules to the config.php which can lead to outcomes that hard to troubleshoot. This task helps to watch for such cases and let to know when registration is missing.\n\nTo use this task, just specify this inside `grumphp.yml` in the `tasks:` section.\n\n```yaml\nparameters:\n    tasks:\n        magento2-module-registration:\n            composer_json_path: ~\n            composer_home_path: ~\n            configphp_path: ~\n            allowed_package_types: ~\n            custom_module_pattern: ~\n            allowed_packages:\n                magento/data-migration-tool: [\"Magento_DataMigrationTool\"]\n                another-vendor/cool-module: [\"AnotherVendor_CoolModule\"]\n            \n```\n\n**composer_json_path**\n\n*Default: `./composer.json`*\n\nPath to composer.json file of the project. \nThis file will be used to find Magento modules installed via Composer.\n\n**composer_home_path**\n\n*Default: `./var/composer_home`*\n\nPath to Composer Home directory.\n\n**configphp_path**\n\n*Default: `./app/etc/config.php`*\n\nPath to config.php file of the project.\n\n**allowed_package_types**\n\n*Default: `['magento2-module', 'magento2-component']`*\n\nMagento package types that we need to track during checking of packages. \nSometimes vendors don't specify package type, but normally they should.\n\n**allowed_packages**\n\n*Default: `[\"magento/data-migration-tool\": [\"Magento_DataMigrationTool\"]]`*\n\nIn case module vendor did not created a module in a normal way (no package type was specified or psr-4 autoloader prefix is different then module name), this config helps to watch for such packages. \nKey of the array is a package name. The value is a list of module names that the package brings.\n\n**custom_module_pattern**\n\n*Default: `./app/code/*/*/registration.php`*\n\nA glob() pattern that helps to find custom non-composer magento modules.\n\n### 🛠 MagentoLogNotification\n\nIt's useful to be notified when you have recently added records in Magento logs. This tasks checks log files located \nunder `log_patterns` and informs if there are logs that have been added inside of time frame defined in `record_stale_threshold`.\nThe `exclude_severities` helps to reduce noisy records. \n\n```yaml\nparameters:\n    tasks:\n        magento2-log-notification:\n            log_patterns:\n              - \"./var/*/*.log\"\n            record_stale_threshold: 1 # in days\n            exclude_severities:\n              - \"INFO\"\n              - \"DEBUG\"\n```\n\n**log_patterns**\n\n*Default: `./var/*/*.log`*\n\nPaths where log files should be watched\n\n**record_stale_threshold**\n\n*Default: `1`*\n\nStale threshold (in days) that helps to ignore old records in logs.\n\n**exclude_severities**\n\n*Default: `INFO, DEBUG`*\n\nThis config excludes records with specified severity levels.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froma-glushko%2Fgrumphp-magento2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froma-glushko%2Fgrumphp-magento2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froma-glushko%2Fgrumphp-magento2/lists"}