PHPackages                             marc-mabe/php-enum-phpstan - 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. marc-mabe/php-enum-phpstan

ActivePhpstan-extension[Utility &amp; Helpers](/categories/utility)

marc-mabe/php-enum-phpstan
==========================

Enum class reflection extension for PHPStan

v3.0.0(1y ago)12884.7k↓75.6%65BSD-3-ClausePHPPHP ^7.4 | ^8.0CI failing

Since Jan 7Pushed 7mo ago2 watchersCompare

[ Source](https://github.com/marc-mabe/php-enum-phpstan)[ Packagist](https://packagist.org/packages/marc-mabe/php-enum-phpstan)[ RSS](/packages/marc-mabe-php-enum-phpstan/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (8)Dependencies (3)Versions (9)Used By (5)

PHPStan extension for php-enum
==============================

[](#phpstan-extension-for-php-enum)

[![License](https://camo.githubusercontent.com/9d52db48c701d0d403e3ba14b18906a3cb7e8c5b54eb11a737bc739d64b4223c/68747470733a2f2f706f7365722e707567782e6f72672f6d6172632d6d6162652f7068702d656e756d2d7068707374616e2f6c6963656e7365)](https://github.com/marc-mabe/php-enum-phpstan/blob/master/LICENSE.txt)[![Latest Stable](https://camo.githubusercontent.com/918be2ac7d3b70d7f38b7d350668d7cf187d81ddb13ba1dc12be697637789cd4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6172632d6d6162652f7068702d656e756d2d7068707374616e)](https://packagist.org/packages/marc-mabe/php-enum-phpstan)

[PHP-Enum](https://github.com/marc-mabe/php-enum) enumerations with native PHP.

[PHPStan](https://phpstan.org/) is a static code analysis tool.

> PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs even before you write tests for the code. It moves PHP closer to compiled languages in the sense that the correctness of each line of the code can be checked before you run the actual line.

This PHPStan extension makes enumerator accessor methods and enum possible values known to PHPStan.

Install
-------

[](#install)

Install via [Composer](https://getcomposer.org)

```
composer require --dev marc-mabe/php-enum-phpstan

```

and include extension.neon in your project's PHPStan config

```
includes:
  - vendor/marc-mabe/php-enum-phpstan/extension.neon

```

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance52

Moderate activity, may be stable

Popularity46

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 67.3% 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 ~256 days

Recently: every ~379 days

Total

8

Last Release

570d ago

Major Versions

v1.3.0 → v2.0.02021-11-04

v2.0.1 → v3.0.02024-12-10

PHP version history (3 changes)v1.0.0PHP ~7.1

v1.3.0PHP ^7.1 | ^8.0

v3.0.0PHP ^7.4 | ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0e3d92eaba3c58bb60a72d0113ad102ed0170fe1bd08c0eea83359e573c895f?d=identicon)[marc-mabe](/maintainers/marc-mabe)

---

Top Contributors

[![marc-mabe](https://avatars.githubusercontent.com/u/302689?v=4)](https://github.com/marc-mabe "marc-mabe (37 commits)")[![ondrejmirtes](https://avatars.githubusercontent.com/u/104888?v=4)](https://github.com/ondrejmirtes "ondrejmirtes (11 commits)")[![pascalheidmann-check24](https://avatars.githubusercontent.com/u/167064802?v=4)](https://github.com/pascalheidmann-check24 "pascalheidmann-check24 (3 commits)")[![adaamz](https://avatars.githubusercontent.com/u/4347332?v=4)](https://github.com/adaamz "adaamz (2 commits)")[![Chris53897](https://avatars.githubusercontent.com/u/7104259?v=4)](https://github.com/Chris53897 "Chris53897 (1 commits)")[![olekans](https://avatars.githubusercontent.com/u/135211410?v=4)](https://github.com/olekans "olekans (1 commits)")

---

Tags

PHPStanenum

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/marc-mabe-php-enum-phpstan/health.svg)

```
[![Health](https://phpackages.com/badges/marc-mabe-php-enum-phpstan/health.svg)](https://phpackages.com/packages/marc-mabe-php-enum-phpstan)
```

###  Alternatives

[larastan/larastan

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

6.5k55.4M8.4k](/packages/larastan-larastan)[shipmonk/dead-code-detector

Dead code detector to find unused PHP code via PHPStan extension. Can automatically remove dead PHP code. Supports libraries like Symfony, Doctrine, PHPUnit etc. Detects dead cycles. Can detect dead code that is tested.

4853.5M91](/packages/shipmonk-dead-code-detector)[ergebnis/phpstan-rules

Provides rules for phpstan/phpstan.

4579.8M286](/packages/ergebnis-phpstan-rules)[timeweb/phpstan-enum

Enum class reflection extension for PHPStan

443.4M27](/packages/timeweb-phpstan-enum)[ticketswap/phpstan-error-formatter

A minimalistic error formatter for PHPStan

87718.9k56](/packages/ticketswap-phpstan-error-formatter)[johnbillion/wp-compat

PHPStan extension to help verify that your PHP code is compatible with a given version of WordPress

25166.1k18](/packages/johnbillion-wp-compat)

PHPackages © 2026

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