Skip to content

Mediagone/small-uid-doctrine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Small UID for Doctrine

⚠️ This project is in experimental phase, the API may change any time.

Latest Version on Packagist Total Downloads Software License

Provides Doctrine types for mediagone/small-uid package:

  • SmallUidType: binary (8 bytes)

Installation

This package requires PHP (64-bit) 7.4+ and Doctrine DBAL 2.7+

Add it as Composer dependency:

$ composer require mediagone/small-uid-doctrine

With Symfony

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.

As standalone

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);

License

Small UID for Doctrine is licensed under MIT license. See LICENSE file.

About

Provides Doctrine types for "mediagone/small-uid" package.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages