PHPackages                             hayes/php-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. hayes/php-enum

ActiveLibrary

hayes/php-enum
==============

Extension for the myclabs/php-enum library

1.0.1(4y ago)011.9k—8.5%MITPHPPHP ^7.3 || ^8.0

Since Feb 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/hayeslam/php-enum)[ Packagist](https://packagist.org/packages/hayes/php-enum)[ RSS](/packages/hayes-php-enum/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

php-enum
========

[](#php-enum)

Extension for the [myclabs/php-enum](https://github.com/myclabs/php-enum) library.

[Documentation](https://github.com/myclabs/php-enum#documentation)
------------------------------------------------------------------

[](#documentation)

Add method
----------

[](#add-method)

- `getLabel()` Returns the enum label

Static methods:

- `labels()` Returns the labels of all constants in the Enum class

    ```
      // Define the label corresponding to the enumeration value. example:
      return [value => label];
    ```
- `options()` Returns all possible options as an array

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Total

2

Last Release

1539d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6b98417f79e10fd51b7d35635a188689353104e3f2a25261287f27297249dcc9?d=identicon)[hayes](/maintainers/hayes)

---

Top Contributors

[![hayeslam](https://avatars.githubusercontent.com/u/4018271?v=4)](https://github.com/hayeslam "hayeslam (6 commits)")

---

Tags

enumphp-enum

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hayes-php-enum/health.svg)

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

###  Alternatives

[timeweb/phpstan-enum

Enum class reflection extension for PHPStan

443.2M21](/packages/timeweb-phpstan-enum)[zlikavac32/php-enum

Better PHP enum support

225.6k5](/packages/zlikavac32-php-enum)

PHPackages © 2026

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