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

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

gubler/guid-doctrine
====================

Use of a ramsey/uuid UUID with GUID codec as Doctrine field type.

v1.0.0(5y ago)063MITPHPPHP ^7.2

Since Apr 19Pushed 4y ago1 watchersCompare

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

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

gubler/guid-doctrine
====================

[](#gublerguid-doctrine)

This is based off of the ramsey/uuid-doctrine project. The only thing this project does differently is return GUIDs. This to handle Active Directory GUIDs.

---

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

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

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

[](#installation)

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

Examples
--------

[](#examples)

### Configuration

[](#configuration)

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

```
\Doctrine\DBAL\Types\Type::addType('uuid', 'Gubler\Guid\Doctrine\GuidType');
```

In Symfony:

```
# config/packages/doctrine.yaml
doctrine:
   dbal:
       types:
           guid:  Gubler\Guid\Doctrine\GuidType
```

In Zend Framework:

```
