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 1mo ago

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 10% 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

898d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bdb6f0e829d146ae188faa66037657151e48c62631c4dee740af59d9f195a53b?d=identicon)[stephanbouman](/maintainers/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.

583107.1M34.5k](/packages/illuminate-support)[pragmarx/countries

PHP Countries and Currencies

1.9k3.3M18](/packages/pragmarx-countries)[illuminate/events

The Illuminate Events package.

13454.3M1.8k](/packages/illuminate-events)[illuminate/config

The Illuminate Config package.

10842.7M2.2k](/packages/illuminate-config)[illuminate/session

The Illuminate Session package.

9937.4M753](/packages/illuminate-session)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)

PHPackages © 2026

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