PHPackages                             soluciones-ypunto/cake-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. soluciones-ypunto/cake-enum

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

soluciones-ypunto/cake-enum
===========================

Librería básica para implementar enums en CakePHP

1.0.0(7y ago)0164GPL-3.0-or-laterPHP

Since Jan 22Pushed 7y ago2 watchersCompare

[ Source](https://github.com/soluciones-ypunto/cake-enum)[ Packagist](https://packagist.org/packages/soluciones-ypunto/cake-enum)[ RSS](/packages/soluciones-ypunto-cake-enum/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Enum plugin for CakePHP
=======================

[](#enum-plugin-for-cakephp)

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

[](#installation)

You can install this plugin into your CakePHP application using [composer](https://getcomposer.org).

The recommended way to install composer packages is:

```
composer require soluciones-ypunto/cake-enum

```

Usage
-----

[](#usage)

Define your enum lists as follow:

```
// file Model/Enum/SomeList.php

namespace App\Model\Enum;

use Ypunto\EnumType\Enum\Enum;

class SomeList extends Enum
{
    const VALUE_1 = 1;
    const VALUE_2 = 2;
    const SOME_VALUE = 'any-val';

    /**
     * @return string[]
     */
    public static function getOptions()
    {
        return [
            self::VALUE_1 => __('First'),
            self::VALUE_2 => __('Second'),
            self::SOME_VALUE => __('Some Value'),
        ];
    }
}
```

Then use them in forms, to display values or to compare then, without using plain strings.

```
// in templates
// to create select controls
echo $this->Form->control('value', ['options' => \App\Model\Enum\SomeList::getOptions()]);

// to display
echo \App\Model\Enum\SomeList::getOption($entity->value);

// to compare
if ($entity->value === \App\Model\Enum\SomeList::VALUE_1) {
    // do something
}
```

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

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

Unknown

Total

1

Last Release

2761d ago

### Community

Maintainers

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

---

Top Contributors

[![xavier83ar](https://avatars.githubusercontent.com/u/1458700?v=4)](https://github.com/xavier83ar "xavier83ar (3 commits)")

---

Tags

cakephpcakephp-plugincakephp3enums

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/soluciones-ypunto-cake-enum/health.svg)

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

###  Alternatives

[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

3321.0M51](/packages/dereuromark-cakephp-tools)[cakephp/bake

Bake plugin for CakePHP

11212.2M222](/packages/cakephp-bake)[dereuromark/cakephp-ide-helper

CakePHP IdeHelper Plugin to improve auto-completion

1892.4M48](/packages/dereuromark-cakephp-ide-helper)[dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

308995.7k27](/packages/dereuromark-cakephp-queue)[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

131242.7k13](/packages/dereuromark-cakephp-tinyauth)[dereuromark/cakephp-dto

A CakePHP plugin for generating immutable Data Transfer Objects with full type safety

30101.5k6](/packages/dereuromark-cakephp-dto)

PHPackages © 2026

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