fle / postgresql-type-bundle
This bundle extend support of postgresql for doctrine
Installs: 5 969
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.4
- doctrine/dbal: ~2.0
- doctrine/orm: ~2.0
- symfony/http-kernel: ~2.5|^3.0
Requires (Dev)
- phpunit/phpunit: 4.*
- satooshi/php-coveralls: dev-master
README
Overview
Supported Types
Add support to postgresql type.
- Box
- Point
- Cidr
- DateInterval
- DateTime
- DateTime[]
- DateTime with TimeZone
- Time
- Time[]
- Time with TimeZone
- JSON
- JSONB
- int[]:
array(-2147483648, 1, 2, 3, 4, 5, +2147483647)
- bigint[]:
array(-9223372036854775808, 1, 2, 3, 9223372036854775807)
- text[]:
array("Hello", "World")
- text[][]:
array("first" => "Hello", "last" => "World")
Supported Functions
Add support of functions.
- CONTAINTS
SELECT CONTAINTS(ARRAY[1,2,3], 2);
- date_trunc
date_trunc('hour', timestamp '2001-02-16 20:38:40')
ManyToAny
Add ManyToAny Annotation
<?php use Doctrine\ORM\Mapping as ORM; use FLE\Bundle\PostgresqlTypeBundle\Annotation\ManyToAny; /** * @ORM\Entity */ class MyEntity { /** * @var mixed * @ManyToAny() */ protected $mixedEntity; //... }
Installation
Add the bunde to your composer.json
file:
{ "require": { "fle/postgresql-type-bundle": "1.*@dev" } }
Then run a composer update:
composer.phar update fle/postgresql-type-bundle # to only update the bundle
Register the bundle with your kernel in AppKernel::registerBundles()
:
<?php $bundles = array( // ... new FLE\Bundle\PostgresqlTypeBundle\FLEPostgresqlTypeBundle(), // ... );
Usage
Point
To use Point twig template:
twig: form_themes: - 'FLEPostgresqlTypeBundle::Form/point_type_bootstrap3.html.twig'