tbbc / doctrine-dbal-pgsql-types
Doctrine types or fixed types for PostgreSQL.
dev-master / 1.0.x-dev
2014-02-15 14:46 UTC
Requires
- php: >=5.3.3
- doctrine/dbal: ~2.0
Requires (Dev)
- phpunit/phpunit: 3.*
This package is not auto-updated.
Last update: 2024-12-21 16:36:11 UTC
README
This library adds or override some Doctrine DBAL types. Some types fixes issues with some database engines.
Quick Start
Registering Types in Doctrine DBAL
<?php use Doctrine\DBAL\Types\Type; Type::addType('tbbc_pgsql_binary_safe_array', "Tbbc\\Doctrine\\DBAL\\Pgsql\\Types\\BinarySafeArrayType"); Type::addType('tbbc_pgsql_binary_safe_object', "Tbbc\\Doctrine\\DBAL\\Pgsql\\Types\\BinarySafeObjectType");
Registering Types in a Symfony2 application
# config.yml doctrine: dbal: types: tbbc_pgsql_binary_safe_array: "Tbbc\\Doctrine\\DBAL\\Pgsql\\Types\\BinarySafeArrayType" tbbc_pgsql_binary_safe_object: "Tbbc\\Doctrine\\DBAL\\Pgsql\\Types\\BinarySafeObjectType"
Mapping
<entity name="My\Entity" table="my_entity"> <field name="myObject" type="tbbc_pgsql_binary_safe_object" /> <field name="myArray" type="tbbc_pgsql_binary_safe_array" /> </entity>
Installation
Using Composer, just run:
$ composer require tbbc/doctrine-dbal-pgsql-types
Or add it manually to your composer.json
file:
{ "require": { "tbbc/doctrine-dbal-pgsql-types": "dev-master" } }
And run composer update
.
Run the test
First make sure you have installed all the dependencies, run:
$ composer install --dev
then, run the test from within the root directory:
$ vendor/bin/phpunit
Contributing
- Take a look at the list of issues.
- Fork
- Write a test (for either new feature or bug)
- Make a PR
Authors
- Benjamin Dulau - benjamin@thebigbrainscompany.com
License
The Big Brains Company - Doctrine DBAL Types
is licensed under the MIT License - see the LICENSE file for details