PHPackages                             pugx/shortid-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. pugx/shortid-doctrine

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

pugx/shortid-doctrine
=====================

Doctrine type for shortid-php

v1.3.0(2y ago)355.3k↓32.1%21MITPHPPHP ^8.1CI passing

Since Mar 13Pushed 8mo ago7 watchersCompare

[ Source](https://github.com/PUGX/shortid-doctrine)[ Packagist](https://packagist.org/packages/pugx/shortid-doctrine)[ Docs](http://pugx.org/)[ RSS](/packages/pugx-shortid-doctrine/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (15)Used By (1)

ShortId Doctrine Type
=====================

[](#shortid-doctrine-type)

[![Total Downloads](https://camo.githubusercontent.com/301859afb2982a8f3fe2df4627dfe37c4fb8e72df7c2b78e3b3f898833c0c5c4/68747470733a2f2f706f7365722e707567782e6f72672f707567782f73686f727469642d646f637472696e652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/pugx/shortid-doctrine)[![Build Status](https://github.com/PUGX/shortid-doctrine/workflows/build/badge.svg)](https://github.com/PUGX/shortid-doctrine/actions)[![Code Climate](https://camo.githubusercontent.com/c8474f438c6cdf2b9df231d59fb2a5170b5b437fe7b099ef7f3a8dca20d497ba/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f505547582f73686f727469642d646f637472696e652f6261646765732f6770612e737667)](https://codeclimate.com/github/PUGX/shortid-doctrine)

A [Doctrine field type](https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html) for [ShortId](https://github.com/pugx/shortid-php) for PHP.

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

[](#installation)

Run the following command:

```
composer require pugx/shortid-doctrine
```

Note

if you use Symfony, you should require [pugx/shortid-doctrine-bundle](https://github.com/PUGX/shortid-doctrine-bundle) instead.

Examples
--------

[](#examples)

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

```
