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

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

daverandom/enum
===============

A base class for enumerations in PHP

1.0.0(8y ago)0495mitPHPPHP &gt;=7.0

Since Jan 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/DaveRandom/Enum)[ Packagist](https://packagist.org/packages/daverandom/enum)[ RSS](/packages/daverandom-enum/feed)WikiDiscussions master Synced today

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

Enum
====

[](#enum)

A base class for enumerations in PHP.

This library consists of a single abstract class, which can be extended by enumerations so that they need only define their member values as constants. A number of static methods are provided to facilitate name and value validation and resolution.

It is intended merely as an easy way for me to share this functionality, in a highly `node_modules`-esque manner. It is probably best that people do not do this, but #yolo.

Status
------

[](#status)

[![Build Status](https://camo.githubusercontent.com/cb9156f318f70d6fe34ae18cf2ce94514a52ea28f92dfc36b09a100c84843c99/68747470733a2f2f7472617669732d63692e6f72672f4461766552616e646f6d2f456e756d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/DaveRandom/Enum)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/216a391cc8935720d986934fdd2d2b35365b8de31fcf55f98df78437f7fb35a4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4461766552616e646f6d2f456e756d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/DaveRandom/Enum/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/79040aea9b2b52db07b5889be70b1ca4f2ae270a2870ccb20c77e7809ef11104/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4461766552616e646f6d2f456e756d2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/DaveRandom/Enum/?branch=master)

###  Health Score

28

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

2992d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb9d79bcd4c3c02b52daba8a5371a4d710286d9b7472c8d922008c48999d76b9?d=identicon)[DaveRandom](/maintainers/DaveRandom)

---

Top Contributors

[![DaveRandom](https://avatars.githubusercontent.com/u/2396425?v=4)](https://github.com/DaveRandom "DaveRandom (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[sheadawson/silverstripe-shortcodable

Provides a GUI for CMS users to insert Shortcodes into the HTMLEditorField + an API for developers to define Shortcodable DataObjects and Views

5018.1k5](/packages/sheadawson-silverstripe-shortcodable)[nahid/presento

Presento is a package for PHP data presenter

747.2k](/packages/nahid-presento)[codespede/simple-multi-threader

112.6k](/packages/codespede-simple-multi-threader)

PHPackages © 2026

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