2017 © Pedro Peláez
 

library doctrine-date-interval

Backported Doctrine DBAL DateIntervalType for use with DBAL <2.6

image

timdev/doctrine-date-interval

Backported Doctrine DBAL DateIntervalType for use with DBAL <2.6

  • Friday, April 21, 2017
  • by timdev
  • Repository
  • 1 Watchers
  • 0 Stars
  • 190 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 184 % Grown

The README.md

Doctrine DateInterval Type

Doctrine DBAL 2.6 will introduce a DateInterval type which will map a PHP \DateInterval to a column in the database. This will allow mapping DateInterval properties on your entities in the ORM., (*1)

At the time of this writing, 2.6 hasn't been released, but I need this for a project. So, this little project provides the type for use in 2.5 (and probably lower)., (*2)

This is simply a copy/paste job of the DateIntervalType class from the upcoming DBAL 2.6, with a composer.json so it's easy to pull into a project using <2.6., (*3)

Installation

$ composer require timdev/doctrine-date-interval:0.1.2

Usage

Where ever you initialize your EntityManager:, (*4)

\Doctrine\DBAL\Types\Type::addType('dateinterval', \TimDev\Doctrine\DBAL\Types\DateIntervalType::class);
$entityManager
    ->getConnection()
    ->getDatabasePlatform()
    ->registerDoctrineTypeMapping('dateinterval', 'dateinterval');

The Versions

21/04 2017

dev-master

9999999-dev https://github.com/timdev/docrine-date-interval

Backported Doctrine DBAL DateIntervalType for use with DBAL <2.6

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

by Tim Lieberman

doctrine dbal dateinterval

21/04 2017

v0.1.2

0.1.2.0 https://github.com/timdev/docrine-date-interval

Backported Doctrine DBAL DateIntervalType for use with DBAL <2.6

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

by Tim Lieberman

doctrine dbal dateinterval

21/04 2017

v0.1.1

0.1.1.0 https://github.com/timdev/docrine-date-interval

Backported Doctrine DBAL DateIntervalType for use with DBAL <2.6

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

by Tim Lieberman

doctrine dbal dateinterval

21/04 2017

v0.1.0

0.1.0.0

Nothing to see here

  Sources   Download

MIT

by Tim Lieberman