mmerian/doctrine-timestamp

A library adding the timestamp type to Doctrine ORM

This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.

Installs: 176 832

Dependents: 0

Suggesters: 0

Security: 0

Stars: 15

Watchers: 2

Forks: 13

Open Issues: 4

pkg:composer/mmerian/doctrine-timestamp

1.0 2018-02-24 17:38 UTC

This package is auto-updated.

Last update: 2025-08-25 09:00:29 UTC


README

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": {
    "mmerian/doctrine-timestamp": "dev-master"
  }
}

Then, when bootstraping your doctrine connection :

Type::addType('timestamp', 'DoctrineTimestamp\DBAL\Types\Timestamp');
$conn->getDatabasePlatform()->registerDoctrineTypeMapping('Timestamp', 'timestamp');