dontdrinkandroot / doctrine-bundle
Symfony Bundle that provides Doctrine Utilities
Package info
github.com/dontdrinkandroot/doctrine-bundle.php
Type:symfony-bundle
pkg:composer/dontdrinkandroot/doctrine-bundle
Requires
- php: >=5.5
- doctrine/doctrine-bundle: ~1.4
- dontdrinkandroot/doctrine: 0.1.x-dev
- dontdrinkandroot/utils: 0.5.x-dev
- dontdrinkandroot/utils-bundle: 0.3.x-dev
- symfony/symfony: ~2.7
Requires (Dev)
- phpunit/phpunit: ~4.1
Suggests
- doctrine/data-fixtures: For data fixture testing
- graphp/graphviz: For rendering Entity Relationship diagrams
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-16 08:47:06 UTC
README
Types
instant
Maps Dontdrinkandroot\Common\Instant to an epoch-millis BIGINT column (like a Java long holding
System.currentTimeMillis()). On PostgreSQL the column is TIMESTAMP(6) WITH TIME ZONE instead (like
Hibernate's mapping of java.time.Instant), while the PHP representation remains epoch millis.
Transparent parameter binding
The bundle registers a Doctrine DBAL middleware that converts Instant query parameters to their
database representation automatically — you never need to specify the type explicitly:
$query->setParameter('createdAt', $instant); // just works $query->setParameter('createdAt', $instant, 'instant'); // still works, never converted twice
This applies to all queries — DQL, QueryBuilder, native SQL and IN (...) lists. The conversion is
identical to an explicit instant bind: epoch millis on non-PostgreSQL platforms, UTC timestamp
strings on PostgreSQL. All other parameter values pass through unchanged.