PHPackages                             inviqa/phpstan-magento2 - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. inviqa/phpstan-magento2

ActiveLibrary[Testing &amp; Quality](/categories/testing)

inviqa/phpstan-magento2
=======================

Extension for PHPStan to allow analysis of Magento2 code.

0.1.2(6y ago)559.0k↓50%2[2 issues](https://github.com/inviqa/phpstan-magento2/issues)MITPHP

Since Apr 5Pushed 6y ago6 watchersCompare

[ Source](https://github.com/inviqa/phpstan-magento2)[ Packagist](https://packagist.org/packages/inviqa/phpstan-magento2)[ RSS](/packages/inviqa-phpstan-magento2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

phpstan-magento2 extension
==========================

[](#phpstan-magento2-extension)

Extension for [PHPStan](https://github.com/phpstan/phpstan) to allow analysis of Magento2 code.

This is fairly bare-bones at the moment, just bootstrapping Magento

Usage
-----

[](#usage)

Add `phpstan.neon` to your Magento2 project.

Make sure it has

```
includes:
	- vendor/inviqa/phpstan-magento2/extension.neon
```

Whilst this extension depends on phpstan/phpstan, it can also depend on phpstan/phpstan-shim, which decouples its dependencies from Magento's own use of them. Some versions of Magento 2 will require the latter due to conflicting symfony/console version constraints.

With coupled dependencies:

```
composer require inviqa/phpstan-magento2 phpstan/phpstan
```

With uncoupled phar package:

```
composer require inviqa/phpstan-magento2 phpstan/phpstan-shim
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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 ~115 days

Total

3

Last Release

2370d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6b33b247b870cf3add3d95961e04f7b87c63d0817af5c373837c28ae3c1aeaf0?d=identicon)[inviqa-session](/maintainers/inviqa-session)

---

Top Contributors

[![andytson-inviqa](https://avatars.githubusercontent.com/u/11387086?v=4)](https://github.com/andytson-inviqa "andytson-inviqa (7 commits)")

### Embed Badge

![Health badge](/badges/inviqa-phpstan-magento2/health.svg)

```
[![Health](https://phpackages.com/badges/inviqa-phpstan-magento2/health.svg)](https://phpackages.com/packages/inviqa-phpstan-magento2)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

78768.9M1.5k](/packages/phpstan-phpstan-symfony)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

66766.6M1.1k](/packages/phpstan-phpstan-doctrine)[phpat/phpat

PHP Architecture Tester

1.2k3.5M32](/packages/phpat-phpat)[spaze/phpstan-disallowed-calls

PHPStan rules to detect disallowed method &amp; function calls, constant, namespace, attribute, property &amp; superglobal usages, with powerful rules to re-allow a call or a usage in places where it should be allowed.

33320.0M375](/packages/spaze-phpstan-disallowed-calls)[mglaman/phpstan-drupal

Drupal extension and rules for PHPStan

20829.0M124](/packages/mglaman-phpstan-drupal)

PHPackages © 2026

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