PHPackages                             phpro/magento-conventions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phpro/magento-conventions

ActivePackage[Utility &amp; Helpers](/categories/utility)

phpro/magento-conventions
=========================

GrumPHP conventions for Magento projects at PHPro

0.4.1(3mo ago)11.7k2MITPHPPHP ^8.2

Since Jan 28Pushed 2w agoCompare

[ Source](https://github.com/phpro/magento-conventions)[ Packagist](https://packagist.org/packages/phpro/magento-conventions)[ RSS](/packages/phpro-magento-conventions/feed)WikiDiscussions main Synced today

READMEChangelog (5)Dependencies (18)Versions (9)Used By (0)

GrumPHP Magento Convention
==========================

[](#grumphp-magento-convention)

This package is to be required on all PHPro's Magento projects.

Configuration
-------------

[](#configuration)

The project `grumphp.yml` should contain at least:

```
imports:
    - { resource: './vendor/phpro/magento-conventions/grumphp-convention.yml' }

parameters:
  git.project: (FOO)

```

### Configurable parameters

[](#configurable-parameters)

#### GENERAL

[](#general)

ParameterDefaultInfo**root\_conventions\_dir**vendor/phpro/magento-conventions/Conventions/Relative path to the root directory of the convention installation#### PHPCS

[](#phpcs)

ParameterDefaultInfo**phpcs.standard**\[ Magento2, PSR2 \]The standards to check code styling**phpcs.severity**~Global severity level**phpcs.warning\_severity**~Warning severity level**phpcs.error\_severity**~Error severity level**phpcs.whitelist\_patterns**\[ '/^app/code/(.\*)/' \]Whitelist patterns to check code styling**phpcs.ignore\_patterns**\[ "Test/Unit", "Setup/Patch/Data", "Setup/Upgrade", "Setup/Install" \]Ignore patterns**phpcs.exclude**\[ Magento2.Functions.StaticFunction, Magento2.Exceptions.DirectThrow, Magento2.Exceptions.ThrowCatch, Magento2.Commenting.ClassAndInterfacePHPDocFormatting, Magento2.Commenting.ClassPropertyPHPDocFormatting, Magento2.Commenting.ConstantsPHPDocFormatting, Magento2.Annotation.MethodAnnotationStructure, Magento2.Annotation.MethodArguments \]Bullet list of excluded sniffs**phpcs.triggered\_by**\[ php \]Triggered by#### PHP CS FIXER

[](#php-cs-fixer)

If you want to change the rules or check paths, we recommend to create and use your own `.php-cs-fixer.php` file in your project.

ParameterDefaultInfo**phpcs\_file**cs/.php-cs-fixer.phpRelative path to CS config file**phpcsfixer.allow\_risky**~Allow risky**phpcsfixer.cache\_file**~Create a .php\_cs cache file**phpcsfixer.config**'%root\_dir%%phpcs\_file%'Path to php CS config file**phpcsfixer.rules**\[ \]Add custom rules**phpcsfixer.using\_cache**~Use caching**phpcsfixer.config\_contains\_finder**trueConfiguration file uses a finder**phpcsfixer.verbose**trueVerbose**phpcsfixer.diff**falseDiff**phpcsfixer.triggered\_by**\[ 'php' \]Php triggered by files#### PHPLINT

[](#phplint)

ParameterDefaultInfo**phplint.exclude**\[ 'vendor' \]Excluded directories**phplint.jobs**~Lint jobs**phplint.short\_open\_tag**falseShort open tags**phplint.ignore\_patterns**\[ \]ignore patterns**phplint.triggered\_by**\[ 'php', 'phtml' \]Triggered by files#### PHPSTAN

[](#phpstan)

For existing Magento 2 project, we recommend to set the level to `1` or `0` and fix the issues you encounter.

The minimal PHPStan version in your project should be `0.12.65` to ensure the `excludePaths` config will work.

ParameterDefaultInfo**phpstan\_file**phpstan/phpstan.neonRelative path to PHPStan neon file**phpstan.autoload\_file**~Autoload files**phpstan.configuration**'%root\_dir%%phpstan\_file%'Path to configuration file**phpstan.level**5Level of PHPstan (0-8)**phpstan.triggered\_by**\[ 'php' \]PHPStan triggered files**phpstan.memory\_limit**"-1"Memory limit PHPStan uses**phpstan.use\_grumphp\_paths**trueUse GrumPHP paths**phpstan.ignore\_patterns**\[ "/Test/", "/Setup/", "pub/" \]Ingore patterns#### PHPUNIT

[](#phpunit)

Make sure you create a `phpunit.xml` file in your project root.

ParameterDefaultInfo**phpunit.config\_file**~Path to phpunit.xml**phpunit.testsuite**~Run tests for certain suite**phpunit.group**\[ \]Run tests for certain group**phpunit.always\_execute**trueAlways run the whole test suite, even if no PHP files were changed**phpunit.order**nullRun tests in a specific order#### COMPOSER

[](#composer)

ParameterDefaultInfo**composer.file**./composer.jsonFile location**composer.no\_check\_all**falseCheck all**composer.no\_check\_lock**trueCheck lock file**composer.no\_check\_publish**trueCheck publish**composer.no\_local\_repository**trueCheck for local repo's**composer.with\_dependencies**trueCheck dependencies**composer.strict**falseSet composer to strict#### GIT

[](#git)

ParameterDefaultInfo**git.project**PROJECTProject abbreviation code used in Jira. Use (FOO|BAR) for multiple projects**git\_commit\_message.matchers**\['/%git.project%-(\[0-9\]\*)/'\]Match commit message to PROJECT-{number}...**git\_commit\_message.max\_subject\_width**70Git commit subject message length**git\_commit\_message.max\_body\_width**80Git commit body message length**git\_commit\_message.case\_insensitive**trueMessage is case sensitive**git\_commit\_message.multiline**trueMessage can contain multiple lines**git\_branch\_name.blacklist**\[ "development", "production", "staging", "master", "infra" \]List of non-wanted branch names**git\_branch\_name.whitelist**Check phpro-grumphp.yml itselfAllowed branch names**git\_blacklist.keywords**Check phpro-grumphp.yml itselfDisallowed words**git\_blacklist.triggered\_by**\['php', 'js', 'html', 'phtml'\]Triggered by files**git\_branch\_name.allow\_detached\_head**trueAllow detached head#### FILE SIZE

[](#file-size)

ParameterDefaultInfo**file\_size.size**5MThe maximum file size**file\_size.ignore\_patterns**\[ \]Patterns that will be ignored#### CLOVER

[](#clover)

ParameterDefaultInfo**clover\_coverage.clover\_file**./.clover.xmlThe maximum file size**clover\_coverage.minimum\_level**20Clover minimum level, this will hard fail if not reached**clover\_coverage.target\_level**80Clover target level, this will soft fail if not reached#### SECURITYCHECKER COMPOSERAUDIT

[](#securitychecker-composeraudit)

ParameterDefaultInfo**securitychecker\_composeraudit.format**null**securitychecker\_composeraudit.locked**true**securitychecker\_composeraudit.no\_dev**false**securitychecker\_composeraudit.run\_always**true**securitychecker\_composeraudit.working\_dir**null**securitychecker\_composeraudit.abandoned**ignoreIgnore abandoned packages, Magento uses some

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance89

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~11 days

Total

6

Last Release

99d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cab1b0de06c75fec5317beded0c2978f3e9e560e6830c1d9048f3e37b3287342?d=identicon)[phpro](/maintainers/phpro)

---

Top Contributors

[![jokeputs](https://avatars.githubusercontent.com/u/5744027?v=4)](https://github.com/jokeputs "jokeputs (8 commits)")[![BrentRobert](https://avatars.githubusercontent.com/u/6866325?v=4)](https://github.com/BrentRobert "BrentRobert (2 commits)")[![bertverbessem](https://avatars.githubusercontent.com/u/5083064?v=4)](https://github.com/bertverbessem "bertverbessem (1 commits)")

### Embed Badge

![Health badge](/badges/phpro-magento-conventions/health.svg)

```
[![Health](https://phpackages.com/badges/phpro-magento-conventions/health.svg)](https://phpackages.com/packages/phpro-magento-conventions)
```

###  Alternatives

[youwe/testing-suite

Contains Youwe's default testing packages for php.

13191.0k8](/packages/youwe-testing-suite)[wp-cli/wp-cli-tests

WP-CLI testing framework

423.1M142](/packages/wp-cli-wp-cli-tests)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

40252.8k34](/packages/ec-europa-toolkit)[humanmade/coding-standards

Human Made Coding Standards

160443.1k59](/packages/humanmade-coding-standards)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M343](/packages/drupal-core-dev)[shopsys/coding-standards

Coding standards definition compatible with PSR-2

20280.7k20](/packages/shopsys-coding-standards)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
