doctrisigphp/doctrine-types

Custom types for doctrine


License
MIT

Documentation

Doctrine Custom Types

ABANDONED, this repository will be removed.

Total Downloads Latest Stable Version License Monthly Downloads

Package Installation

The best way to install Doctrine Custom Types is using Composer:

$ composer require doctrisigphp/doctrine-types

In configuration of Kdyby\Doctrine use:

doctrine:
	user: ***
	password: ***
	...
	types: [
		DoctriSigPHP\Doctrine\DBAL\Types\TrimString
	]

Classic configuration:

<?php
// in bootstrapping code

// ...

use Doctrine\DBAL\Types\Type;

// ...

// Register my type
Type::addType('tString', 'DoctriSigPHP\Doctrine\DBAL\Types\TrimString');

Usage

...
class MyEntity {
    ...
	/**
	 * @ORM\Column(type="tString")
	 */
	protected $name;
    ...
}

To do

  • DI Extension to autoload all types
  • Add more types (if you some need, write to issue)