|
||
---|---|---|
demo | ||
src | ||
tests | ||
.gitattributes | ||
.gitignore | ||
.gitlab-ci.yml | ||
CHANGELOG.md | ||
LICENSE.md | ||
README.md | ||
composer.json | ||
phpcs.xml | ||
phpunit.dist.xml | ||
psalm.xml |
README.md
Doctrine Support for arokettu/uuid
arokettu/uuid
row classes and ID generators for Doctrine.
Usage
<?php
use Arokettu\Uuid\Doctrine\{UuidType,UuidV4Generator};
use Arokettu\Uuid\Uuid;
use Doctrine\ORM\Mapping\{Column,CustomIdGenerator,Entity,GeneratedValue,Id,Table};
#[Entity, Table(name: 'uuid_object')]
class UuidObject
{
#[Column(type: UuidType::NAME)]
#[Id, GeneratedValue(strategy: 'CUSTOM'), CustomIdGenerator(UuidV4Generator::class)]
public Uuid $id;
#[Column(type: UuidType::NAME)]
public Uuid $uuidString;
}
Installation
composer require arokettu/uuid-doctrine
- Version 1.x is for
doctrine/dbal
v3 - Version 2.x is for
doctrine/dbal
v4
The versions are fully interchangeable except for hard dependency on DBAL.
Documentation
Read full documentation for the base library here: https://sandfox.dev/php/uuid.html
Also on Read the Docs: https://arokettu-uuid.readthedocs.io/
Support
Please file issues on our main repo at GitLab: https://gitlab.com/sandfox/php-uuid/-/issues
Feel free to ask any questions in our room on Gitter: https://gitter.im/arokettu/community
Both 1.x and 2.x versions are actively supported.
License
The library is available as open source under the terms of the MIT License.