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)13817.7k↓25.5%65BSD-3-ClausePHPPHP ^7.4 | ^8.0CI passing

Since Jan 7Pushed 5mo 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 1mo 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

52

—

FairBetter than 96% of packages

Maintenance56

Moderate activity, may be stable

Popularity47

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity67

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

525d 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

[myclabs/php-enum

PHP Enum implementation

2.7k227.9M637](/packages/myclabs-php-enum)[dasprid/enum

PHP 7.1 enum implementation

382146.0M11](/packages/dasprid-enum)[spatie/enum

PHP Enums

84529.1M68](/packages/spatie-enum)[ergebnis/phpstan-rules

Provides rules for phpstan/phpstan.

4428.9M187](/packages/ergebnis-phpstan-rules)[marc-mabe/php-enum

Simple and fast implementation of enumerations with native PHP

49644.8M97](/packages/marc-mabe-php-enum)[timeweb/phpstan-enum

Enum class reflection extension for PHPStan

443.2M21](/packages/timeweb-phpstan-enum)

PHPackages © 2026

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