PHPackages                             justbetter/magento2-coding-standard - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. justbetter/magento2-coding-standard

ActivePackage[PSR &amp; Standards](/categories/psr-standards)

justbetter/magento2-coding-standard
===================================

This package contains the coding standards configurations used for our packages and projects

1.0.4(3mo ago)04901MITPHP

Since Mar 9Pushed 3mo agoCompare

[ Source](https://github.com/justbetter/magento2-coding-standard)[ Packagist](https://packagist.org/packages/justbetter/magento2-coding-standard)[ RSS](/packages/justbetter-magento2-coding-standard/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (1)

Magento 2 Coding Standard
=========================

[](#magento-2-coding-standard)

This repository contains the coding standards configurations used for our packages and projects.

installation
------------

[](#installation)

Installation is not strictly necessary, you could simply copy the files you care about and update the paths. This way you will not get any updates in the future.

Run

```
composer require --dev "justbetter/magento2-coding-standard"
```

### Editorconfig

[](#editorconfig)

The editorconfig is made so your editors are in sync with each other, to prevent different editor from constantly causing changes and conflicts with each other or other tools.

```
\ln -sf vendor/justbetter/magento2-coding-standard/.editorconfig .editorconfig
```

PHPStan
-------

[](#phpstan)

First you should install [phpstan-magento](https://github.com/bitexpert/phpstan-magento).

```
composer require --dev "bitexpert/phpstan-magento"
```

then copy the sample configuration file, this includes larastan with some basic setup from magento2-coding-standard, like the editor url button.

```
\cp vendor/justbetter/magento2-coding-standard/phpstan.sample.neon phpstan.neon
```

### Optional - Copy workflow

[](#optional---copy-workflow)

Once you've installed PHPStan you could copy the analyse workflow to automatically run it for PRs

```
\mkdir -p .github/workflows
\cp vendor/justbetter/magento2-coding-standard/.github/sample-workflows/analyse.yml .github/workflows/analyse.yml
```

Rector
------

[](#rector)

As a good companion to PHPStan we also have configuration for Rector which can in some cases fix PHPStan issues, and improve the results given by PHPStan

Copy the sample configuration file, this includes Rector with some basic setup from magento2-coding-standard.

```
\cp vendor/justbetter/magento2-coding-standard/rector.sample.php rector.php
```

Rector is much more stable in it's changes than it ever was, rarely (if at all) making breaking changes. We still recommend running it manually instead of using workflows.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance80

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

5

Last Release

104d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d00b3f55cd4ae8b8cfb001a644ed6c7a1127a956c24375bcfe16ce12bd89bed?d=identicon)[justbetter](/maintainers/justbetter)

---

Top Contributors

[![indykoning](https://avatars.githubusercontent.com/u/15870933?v=4)](https://github.com/indykoning "indykoning (5 commits)")

### Embed Badge

![Health badge](/badges/justbetter-magento2-coding-standard/health.svg)

```
[![Health](https://phpackages.com/badges/justbetter-magento2-coding-standard/health.svg)](https://phpackages.com/packages/justbetter-magento2-coding-standard)
```

###  Alternatives

[aura/di

A serializable dependency injection container with constructor and setter injection, interface and trait awareness, configuration inheritance, and much more.

352982.2k60](/packages/aura-di)[icamys/php-sitemap-generator

Simple PHP sitemap generator.

175356.9k7](/packages/icamys-php-sitemap-generator)[wyrihaximus/psr-15-cat

CAT!

124.3k2](/packages/wyrihaximus-psr-15-cat)

PHPackages © 2026

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