Doctrine Support

Packagist GitLab GitHub Bitbucket Gitea

Doctrine support is split into a separate package.


composer require 'arokettu/date-doctrine'

Available Types

  • DateType. UUID stored in a native DATE column.


Register types:


use Arokettu\Uuid\Doctrine\DateType;
use Doctrine\DBAL\Types\Type;

// registers types directly
Type::addType(DateType::NAME, DateType::class);


See your framework documentation for proper configuration of custom Doctrine types.

Apply type to a model:


use Arokettu\Date\Date;
use Doctrine\ORM\Mapping\{Column,Table};

#[Entity, Table(name: 'date_object')]
class DateObject
    #[Column(type: DateType::NAME)]
    public Date $date;