PHPackages                             gubler/doctrine-extra-types - 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/doctrine-extra-types

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

gubler/doctrine-extra-types
===========================

Adds extra and alternate Doctrine column types

v2.0.1(4y ago)031MITPHPPHP ^7.2|^8.0CI failing

Since Feb 11Pushed 4y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

DoctrineExtraTypes
==================

[](#doctrineextratypes)

This project provides extra or replacement data types for Doctrine 2.

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

[](#installation)

The preferred method of installation is via Composer. Run the following command to install the package and add it as a requirement to your project's `composer.json`:

```
composer require gubler/doctrine-extra-types
```

Types
-----

[](#types)

### UTCDateTime

[](#utcdatetime)

The `UTCDateTimeType` is copied from the \[Doctrine ORM documentation\]\[doctine-docs-utc\] and converts `DateTime` object's timezone to UTC before storing them in the database.

#### Use

[](#use)

This *replaces* the existing Doctrine `datetime` type.

In Symfony:

```
# config/packages/doctrine.yaml
doctrine:
   dbal:
       types:
           datetime:
               class: Gubler\DoctrineExtraTypes\UTCDateTime\UTCDateTimeType
```

**Note:** This type *only* converts the DateTime when saving to the database. This *does not* convert the datetime back to the original timezone when reading form the database. You will need to convert the UTC datetime to whichever timezone you need.

After this, you can use the `datetime` Doctrine type normally and any DateTimes will be converted to UTC.

### Guid

[](#guid)

This project used to supply a GUID doctrine type. This is now provided by [gubler/guid-doctrine](https://github.com/gubler/guid-doctrine)

Contributing
------------

[](#contributing)

Contributions are welcome! Please read [CONTRIBUTING](https://github.com/gubler/doctrine-extra-types/blob/master/CONTRIBUTING.md) for details.

This project adheres to a [Contributor Code of Conduct](https://github.com/gubler/doctrine-extra-types/blob/master/CODE_OF_CONDUCT.md). By participating in this project and its community, you are expected to uphold this code.

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

[](#copyright-and-license)

The `gubler/doctrine-extra-types` library is copyright © [Daryl Gubler](http://dev88.co/) and licensed for use under the MIT License (MIT). Please see [LICENSE](https://github.com/gubler/doctrine-extra-types/blob/master/LICENSE) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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

Total

3

Last Release

1788d ago

Major Versions

v1.0.0 → v2.0.02020-05-11

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

v2.0.0PHP ^7.2

v2.0.1PHP ^7.2|^8.0

### 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 (4 commits)")

---

Tags

doctrineuuididentifierguidutc

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[knplabs/doctrine-behaviors

Doctrine Behavior Traits

92212.7M64](/packages/knplabs-doctrine-behaviors)[scienta/doctrine-json-functions

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

58523.9M36](/packages/scienta-doctrine-json-functions)[rorecek/laravel-ulid

Laravel package for ULID (Universally Unique Lexicographically Sortable Identifier)

52160.3k1](/packages/rorecek-laravel-ulid)

PHPackages © 2026

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