PHPackages                             stephanbouman/enumcollection - 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. stephanbouman/enumcollection

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

stephanbouman/enumcollection
============================

Lets add collections into Enums

v1.0.0(2y ago)02PHP

Since Nov 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/stephanbouman/enum-collections)[ Packagist](https://packagist.org/packages/stephanbouman/enumcollection)[ RSS](/packages/stephanbouman-enumcollection/feed)WikiDiscussions main Synced today

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

EnumCollection
==============

[](#enumcollection)

This package adds a `asCollection()` method to your enums. Now you don't need to wrap your `Enum::cases()` in a collection.

How to implement
----------------

[](#how-to-implement)

```
use Stephanbouman\Enumcollection\HasCollection;

enum TestEnum {
    use HasCollection; // use the HasCollection trait

    case Foo;
    case Bar;
}
```

How to use
----------

[](#how-to-use)

```
// instead of
collect(Fruits::cases())->filter(...)

// use
Fruits::asCollection()->filter(...)
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

945d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/67788644?v=4)[stephanbouman](/maintainers/stephanbouman)[@stephanbouman](https://github.com/stephanbouman)

---

Top Contributors

[![stephanbouman](https://avatars.githubusercontent.com/u/67788644?v=4)](https://github.com/stephanbouman "stephanbouman (1 commits)")

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/stephanbouman-enumcollection/health.svg)

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

###  Alternatives

[illuminate/support

The Illuminate Support package.

630113.0M41.0k](/packages/illuminate-support)[illuminate/events

The Illuminate Events package.

13557.0M2.1k](/packages/illuminate-events)[craftcms/cms

Craft CMS

3.6k3.6M3.0k](/packages/craftcms-cms)[illuminate/config

The Illuminate Config package.

10944.5M2.5k](/packages/illuminate-config)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/session

The Illuminate Session package.

9939.3M845](/packages/illuminate-session)

PHPackages © 2026

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