Provides Doctrine types for mediagone/small-uid
package:
SmallUidType
: binary (8 bytes)
This package requires PHP (64-bit) 7.4+ and Doctrine DBAL 2.7+
Add it as Composer dependency:
$ composer require mediagone/small-uid-doctrine
If you're using this package in a Symfony project, register Small UID custom type in doctrine.yaml:
doctrine:
dbal:
types:
smalluid: Mediagone\SmallUid\Doctrine\SmallUidType
Note: smalluid
being the type name you'll use in your Entity mappings, you can pick whatever name you wish.
Custom types can also be used separately, but need to be registered in Doctrine DBAL like this:
use Doctrine\DBAL\Types\Type;
use Mediagone\SmallUid\Doctrine\SmallUidType;
Type::addType(SmallUidType::NAME, SmallUidType::class);
// or, with a custom name:
Type::addType('smalluid', SmallUidType::class);
Small UID for Doctrine is licensed under MIT license. See LICENSE file.