PHPackages                             gubler/color-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. gubler/color-doctrine

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

gubler/color-doctrine
=====================

Allow the use of a gubler/color Color as Doctrine field type.

v4.0.0(2y ago)03191MITPHPPHP ^8.2CI failing

Since Jan 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/gubler/color-doctrine)[ Packagist](https://packagist.org/packages/gubler/color-doctrine)[ Docs](https://github.com/gubler/color-doctrine)[ RSS](/packages/gubler-color-doctrine/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (11)Versions (5)Used By (0)

gubler/color-doctrine
=====================

[](#gublercolor-doctrine)

The gubler/color-doctrine package provides the ability to use [gubler/color](https://github.com/gubler/color) as a [Doctrine field type](http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html).

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

[](#installation)

The preferred method of installation is via [Packagist](https://packagist.org/packages/gubler/color-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 gubler/color-doctrine
```

Examples
--------

[](#examples)

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

```
\Doctrine\DBAL\Types\Type::addType('color', 'Gubler\Color\Doctrine\ColorType');
```

In Symfony:

```
# app/config/config.yml
doctrine:
   dbal:
       types:
           color: Gubler\Color\Doctrine\ColorType
```

Then, in your models, you may annotate properties by setting the `Column` attribute type to `color`. Doctrine will handle the rest.

```
 #[Entity]
 #[Table(name="label")]
class label
{
     #[Column(type="color")]
    private Color $color;

    public function getColor(): \Gubler\Color\Color
    {
        return $this->color;
    }
}
```

### More Information

[](#more-information)

For more information on getting started with Doctrine, check out the "\[Getting Started with Doctrine\]\[doctrine-getting-started\]" tutorial.

Thanks
------

[](#thanks)

Huge thanks to [ramsey/uuid-doctrine](https://github.com/ramsey/uuid-doctrine). This project is based off of that package.

Copyright and License
---------------------

[](#copyright-and-license)

The gubler/color-doctrine library is copyright © [Daryl Gubler](https://dev88.co/) and licensed for use under the MIT License (MIT). Please see \[LICENSE\]\[\] for more information.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity79

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

Total

4

Last Release

811d ago

Major Versions

v1.0.0 → v2.0.02021-06-22

v2.0.0 → v3.0.02023-08-11

v3.0.0 → v4.0.02024-04-10

PHP version history (3 changes)v1.0.0PHP ^7.0

v2.0.0PHP ^8.0

v3.0.0PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![gubler](https://avatars.githubusercontent.com/u/3446?v=4)](https://github.com/gubler "gubler (7 commits)")

---

Tags

doctrinecolor

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gubler-color-doctrine/health.svg)

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

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8405.5M96](/packages/laravel-doctrine-orm)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58825.2M48](/packages/scienta-doctrine-json-functions)[api-platform/doctrine-orm

Doctrine ORM bridge

293.9M78](/packages/api-platform-doctrine-orm)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

939.0k](/packages/ahmed-bhs-doctrine-doctor)

PHPackages © 2026

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