kamilkrzywda / dateinterval-bundle
A Symfony bundle for the DateInterval library for Doctrine.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/kamilkrzywda/dateinterval-bundle
Requires
- kamilkrzywda/doctrine-dateinterval: >=1.0,<2.0-dev
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2025-10-03 14:20:48 UTC
README
A Symfony bundle for the DateInterval library for Doctrine.
Summary
The bundle will automatically
- register the
dateinterval
Doctrine mapping type - add the
DATE_INTERVAL
DQL function
to the default entity manager (doctrine.orm.entity_manager
).
Installation
Add it to your list of Composer dependencies:
$ composer require herrera-io/dateinterval-bundle=1.*
Add it to your app/AppKernel.php
file:
<?php public function registerBundles() { $bundles = array( // ... snip ... new Herrera\Symfony\DateInterval\DateIntervalBundle() // ... snip ... ); }
Usage
In your entities
<?php class MyEntity { /** * @ORM\Column(type="dateinterval") */ private $interval; }
In your queries
SELECT j FROM Jobs j WHERE j.interval < DATE_INTERVAL('PT1H')