PHPackages                             timeweb/phpstan-enum - 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. timeweb/phpstan-enum

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

timeweb/phpstan-enum
====================

Enum class reflection extension for PHPStan

4.0.0(1y ago)443.5M↓42.5%7[1 issues](https://github.com/timeweb/phpstan-enum/issues)[1 PRs](https://github.com/timeweb/phpstan-enum/pulls)19MITPHPPHP ^7.4|^8.0CI failing

Since Mar 18Pushed 6mo ago5 watchersCompare

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

READMEChangelog (10)Dependencies (3)Versions (21)Used By (19)

Enum class reflection extension for PHPStan
===========================================

[](#enum-class-reflection-extension-for-phpstan)

[![Build Status](https://github.com/timeweb/phpstan-enum/actions/workflows/ci.yml/badge.svg)](https://actions-badge.atrox.dev/timeweb/phpstan-enum/goto?ref=master)[![License](https://camo.githubusercontent.com/6b6e80bf822f82ffaf49aa6f01a820b68ee67b1f795278cf277a34d21dcac828/68747470733a2f2f706f7365722e707567782e6f72672f74696d657765622f7068707374616e2d656e756d2f6c6963656e7365)](https://packagist.org/packages/timeweb/phpstan-enum)[![Latest Stable Version](https://camo.githubusercontent.com/a843bf8125c75a447aeb14cd47b528611c2ebb3020fa881ee20a730e52c08d7b/68747470733a2f2f706f7365722e707567782e6f72672f74696d657765622f7068707374616e2d656e756d2f762f737461626c65)](https://packagist.org/packages/timeweb/phpstan-enum)[![Latest Unstable Version](https://camo.githubusercontent.com/8cd0cf71ee0769b77320d8fca8fe4e5fd11deb9b15cd552c5214c0a11c330413/68747470733a2f2f706f7365722e707567782e6f72672f74696d657765622f7068707374616e2d656e756d2f762f756e737461626c65)](https://packagist.org/packages/timeweb/phpstan-enum)

- [PHPStan](https://phpstan.org/)
- [PHP Enum](https://github.com/myclabs/php-enum)

This extension defines dynamic methods for `MyCLabs\Enum\Enum` subclasses.

Usage
-----

[](#usage)

To use this extension, require it with [Composer](https://getcomposer.org)

```
composer require --dev timeweb/phpstan-enum
```

If you also install [phpstan/extension-installer](https://github.com/phpstan/extension-installer) then you're all set!

### Manual installation

[](#manual-installation)

If you don't want to use `phpstan/extension-installer`, include extension.neon in your project's PHPStan config:

```
includes:
  - vendor/timeweb/phpstan-enum/extension.neon
```

Install for Local Development
-----------------------------

[](#install-for-local-development)

### With docker

[](#with-docker)

```
git clone git@github.com:timeweb/phpstan-enum.git
cd phpstan-enum
make docker-build
make install
make phpunit
```

### Without docker (localy installed actual version of php, composer, etc)

[](#without-docker-localy-installed-actual-version-of-php-composer-etc)

```
git clone git@github.com:timeweb/phpstan-enum.git
cd phpstan-enum
make install
make phpunit
```

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance53

Moderate activity, may be stable

Popularity54

Moderate usage in the ecosystem

Community33

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~320 days

Total

17

Last Release

642d ago

Major Versions

v1.2.0 → v2.0.02018-08-03

v2.3.1 → v3.0.02021-11-18

v3.1.1 → 4.0.02024-11-13

PHP version history (4 changes)v2.1.0PHP ~7.1

v2.2.3PHP ~7.1|^8.0

v3.1.1PHP ^7.1|^8.0

4.0.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6840b336667785199f89ea057d7be50956b21408d4933eb911d8822a49eede3a?d=identicon)[timeweb](/maintainers/timeweb)

---

Top Contributors

[![jdecool](https://avatars.githubusercontent.com/u/433926?v=4)](https://github.com/jdecool "jdecool (20 commits)")[![rincler](https://avatars.githubusercontent.com/u/24408317?v=4)](https://github.com/rincler "rincler (8 commits)")[![samizdam](https://avatars.githubusercontent.com/u/1556299?v=4)](https://github.com/samizdam "samizdam (5 commits)")[![JeroenVanOort](https://avatars.githubusercontent.com/u/5616838?v=4)](https://github.com/JeroenVanOort "JeroenVanOort (3 commits)")[![anwinged](https://avatars.githubusercontent.com/u/11515656?v=4)](https://github.com/anwinged "anwinged (2 commits)")[![dmitrivereshchagin](https://avatars.githubusercontent.com/u/14558877?v=4)](https://github.com/dmitrivereshchagin "dmitrivereshchagin (1 commits)")[![juntereiner](https://avatars.githubusercontent.com/u/13835681?v=4)](https://github.com/juntereiner "juntereiner (1 commits)")[![ondrejmirtes](https://avatars.githubusercontent.com/u/104888?v=4)](https://github.com/ondrejmirtes "ondrejmirtes (1 commits)")[![burned42](https://avatars.githubusercontent.com/u/16883833?v=4)](https://github.com/burned42 "burned42 (1 commits)")[![babeuloula](https://avatars.githubusercontent.com/u/4849233?v=4)](https://github.com/babeuloula "babeuloula (1 commits)")[![shadowhand](https://avatars.githubusercontent.com/u/38203?v=4)](https://github.com/shadowhand "shadowhand (1 commits)")

---

Tags

enumhacktoberfestphpstanphpstan-extensionPHPStanenum

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/timeweb-phpstan-enum/health.svg)

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

###  Alternatives

[larastan/larastan

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

6.5k60.6M10.5k](/packages/larastan-larastan)[deptrac/deptrac

Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers.

3.0k9.8M261](/packages/deptrac-deptrac)[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.

5014.2M111](/packages/shipmonk-dead-code-detector)[ticketswap/phpstan-error-formatter

A minimalistic error formatter for PHPStan

87766.6k61](/packages/ticketswap-phpstan-error-formatter)[open-feature/sdk

PHP implementation of the OpenFeature SDK

42891.0k25](/packages/open-feature-sdk)[marc-mabe/php-enum-phpstan

Enum class reflection extension for PHPStan

12893.0k15](/packages/marc-mabe-php-enum-phpstan)

PHPackages © 2026

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