PHPackages                             cspray/yape - 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. cspray/yape

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

cspray/yape
===========

Type-safe, object-backed enum implementation in userland PHP.

3.1.0(5y ago)01.5k↓76.5%[2 issues](https://github.com/cspray/yape/issues)5MITPHPPHP &gt;=7.2CI failing

Since Aug 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/cspray/yape)[ Packagist](https://packagist.org/packages/cspray/yape)[ Docs](https://cspray.io/yape)[ RSS](/packages/cspray-yape/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (1)Versions (12)Used By (5)

Yet Another PHP Enum (yape)
===========================

[](#yet-another-php-enum-yape)

A type-safe, object-backed enum implemented in userland PHP. Combined with [cspray/yape-cli](https://github.com/cspray/yape-cli) aims to provide an easy way to use enums in your PHP codebase.

Requirements
------------

[](#requirements)

- PHP 7.2+

Installation
------------

[](#installation)

```
composer require cspray/yape
```

> We also recommend taking a look at [cspray/yape-cli](https://github.com/cspray/yape-cli) and [cspray/yape-dbal](https://github.com/cspray/yape-dbal).

### Documentation

[](#documentation)

The library is documented in-repo under the `docs/` folder, online at , and within the source code itself.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Recently: every ~133 days

Total

11

Last Release

1932d ago

Major Versions

1.2.0 → 2.0.0-rc12019-09-28

2.1.0 → 3.0.02020-05-02

PHP version history (2 changes)1.0.0PHP ^7.2

3.1.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/2abc886f86c3f0b6a1b77879f9e88ce7bb14f5029882e276e92eeb54f2875851?d=identicon)[cspray](/maintainers/cspray)

---

Top Contributors

[![cspray](https://avatars.githubusercontent.com/u/771345?v=4)](https://github.com/cspray "cspray (25 commits)")

---

Tags

enum

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cspray-yape/health.svg)

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

###  Alternatives

[myclabs/php-enum

PHP Enum implementation

2.7k236.1M695](/packages/myclabs-php-enum)[dasprid/enum

PHP 7.1 enum implementation

382165.7M12](/packages/dasprid-enum)[spatie/enum

PHP Enums

85232.6M75](/packages/spatie-enum)[marc-mabe/php-enum

Simple and fast implementation of enumerations with native PHP

50458.3M110](/packages/marc-mabe-php-enum)[spatie/laravel-enum

Laravel Enum support

3685.8M35](/packages/spatie-laravel-enum)[consistence/consistence

Consistence - consistent approach and additions to PHP's functionality

1841.1M18](/packages/consistence-consistence)

PHPackages © 2026

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