Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

[Deprecated] Use "mediagone/types-common-doctrine" instead.

License

Notifications You must be signed in to change notification settings

Mediagone/common-types-doctrine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Common Types for Doctrine

Latest Version on Packagist Total Downloads Software License

Provides Doctrine types for "mediagone/common-types" package.

Installation

This package requires PHP 7.4+ and Doctrine DBAL 2.7+

Add it as Composer dependency:

$ composer require mediagone/common-types-doctrine

With Symfony

If you're using this package in a Symfony project, register utilized custom types in doctrine.yaml:

doctrine:
    dbal:
        types:
            app_slug: Mediagone\Doctrine\Common\Types\Text\SlugType
            ...

Note: app_slug 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\Doctrine\Common\Types\Text\SlugType;

Type::addType(SlugType::NAME, SlugType::class);
// or, with a custom name:
Type::addType('app_slug', SlugType::class);

License

Common Types for Doctrine is licensed under MIT license. See LICENSE file.

About

[Deprecated] Use "mediagone/types-common-doctrine" instead.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages