partitech / doctrine-timestamp
A library adding the timestamp type to Doctrine ORM (forked from mmerian/doctrine-timestamp not updated anymore)
v1.0.1
2023-02-23 09:10 UTC
Requires
- doctrine/dbal: 2.*
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-08-23 17:03:35 UTC
README
Forked version of the mmerian/doctrine-timestamp that have not been updated for years.
Implementation of a timestamp type for the Doctrine DBAL
This library maps the DateTime PHP class to a Unix timestamp (integer) in the database.
Installation
Just add this to your composer.json
{
"require": {
"partitech/doctrine-timestamp": "dev-master"
}
}
Then, when bootstraping your doctrine connection :
Type::addType('timestamp', 'DoctrineTimestamp\DBAL\Types\Timestamp'); $conn->getDatabasePlatform()->registerDoctrineTypeMapping('Timestamp', 'timestamp');