PHPackages                             sbooker/enumerable-doctrine - 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. [Database &amp; ORM](/categories/database)
4. /
5. sbooker/enumerable-doctrine

ActiveLibrary[Database &amp; ORM](/categories/database)

sbooker/enumerable-doctrine
===========================

Litgroup enumerable doctrine type

1.2.2(2y ago)04.9k↓87.5%1MITPHPPHP ^7.3 || ^8.0

Since Jun 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/sbooker/enumerable-doctrine)[ Packagist](https://packagist.org/packages/sbooker/enumerable-doctrine)[ RSS](/packages/sbooker-enumerable-doctrine/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (7)Used By (1)

sbooker/enumerable-doctrine
===========================

[](#sbookerenumerable-doctrine)

[![Latest Version](https://camo.githubusercontent.com/ee03ad112c8903882089b0a423add2b2f5f3a1ff99361d0c7f44022c73d09ea4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73626f6f6b65722f656e756d657261626c652d646f637472696e652e7376673f7374796c653d666c61742d737175617265)](https://img.shields.io/packagist/v/sbooker/enumerable-doctrine)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/sbooker/enumerable-doctrine/blob/master/LICENSE)[![PHP Version](https://camo.githubusercontent.com/e45cc6ff7881df63866feb2f34c8f482fcfad6ced602bd325f387d4a221b4705/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f73626f6f6b65722f656e756d657261626c652d646f637472696e652e7376673f7374796c653d666c61742d737175617265)](https://php.net)[![Total Downloads](https://camo.githubusercontent.com/45aad280d7fdcb3461b06043b5638245808a9ffc004687e37b216c58c3f02f16/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73626f6f6b65722f656e756d657261626c652d646f637472696e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sbooker/enumerable-doctrine)

The sbooker/enumerable-doctrine package provides the ability to use [litgroup-enumerable](https://github.com/LitGroup/enumerable.php) as a [Doctrine field type](https://www.doctrine-project.org/projects/doctrine-dbal/en/2.10/reference/types.html).

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

[](#installation)

The preferred method of installation is via [Packagist](https://packagist.org/packages/ramsey/uuid-doctrine) and [Composer](http://getcomposer.org/). Run the following command to install the package and add it as a requirement to your project's `composer.json`:

```
composer require sbooker/enumerable-doctrine
```

Examples
--------

[](#examples)

### Declare Enum and Doctrine type

[](#declare-enum-and-doctrine-type)

```
class ConcreteEnum extends \LitGroup\Enumerable\Enumerable
{
    // See LitGroup/enumerable
}

class ConcreteEnumType extends \Sbooker\DoctrineEnumerableType\EnumerableType
{
    protected function getEnumClass() : string {
        return ConcreteEnum::class;
    }

    public function getName() {
        return 'concrete_enum';
    }
}
```

### Configuration

[](#configuration)

To configure Doctrine to use ramsey/uuid as a field type, you'll need to set up the following in your bootstrap:

```
\Doctrine\DBAL\Types\Type::addType('concrete_enum', ConcreteEnumType::class);
```

In Symfony:

```
doctrine:
    dbal:
        types:
            concrete_enum: ConcreteEnumType
```

### Usage

[](#usage)

Then, in your models, you may annotate properties by setting the `@Column`type to `concrete_enum`.

```
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="foo")
 */
class Foo
{
    /**
     * @var ConcreteEnum
     *
     * @ORM\Column(type="concrete_enum")
     */
    protected $enum;
}
```

If you use the XML Mapping instead of PHP annotations.

```

```

### More Information

[](#more-information)

For more information on getting started with Doctrine, check out the "[Getting Started with Doctrine](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/getting-started.html)" tutorial.

License
-------

[](#license)

See [LICENSE](https://github.com/sbooker/enumerable-doctrine/blob/master/LICENSE) file.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

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

Total

5

Last Release

1074d ago

PHP version history (2 changes)1.0.0PHP ^7.0

1.1.0PHP ^7.3 || ^8.0

### Community

Maintainers

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

---

Top Contributors

[![sbooker](https://avatars.githubusercontent.com/u/3658174?v=4)](https://github.com/sbooker "sbooker (6 commits)")

---

Tags

enumdoctrineenumerablelitgroup

### Embed Badge

![Health badge](/badges/sbooker-enumerable-doctrine/health.svg)

```
[![Health](https://phpackages.com/badges/sbooker-enumerable-doctrine/health.svg)](https://phpackages.com/packages/sbooker-enumerable-doctrine)
```

###  Alternatives

[martin-georgiev/postgresql-for-doctrine

Extends Doctrine with native PostgreSQL support for arrays, JSONB, ranges, PostGIS geometries, text search, ltree, uuid, and 100+ PostgreSQL-specific functions.

4535.7M4](/packages/martin-georgiev-postgresql-for-doctrine)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8385.5M96](/packages/laravel-doctrine-orm)[fresh/doctrine-enum-bundle

Provides support of ENUM type for Doctrine2 in Symfony applications.

4627.0M12](/packages/fresh-doctrine-enum-bundle)[larapack/doctrine-support

Better Doctrine Support with Laravel (Support for `enum`)

1752.4M56](/packages/larapack-doctrine-support)[flow-php/doctrine-dbal-bulk

Bulk inserts and updates for Doctrine DBAL

14361.1k3](/packages/flow-php-doctrine-dbal-bulk)[heymoon/doctrine-psql-enum

Store PHP native enums as PostgeSQL custom enum types

256.6k](/packages/heymoon-doctrine-psql-enum)

PHPackages © 2026

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