ricardoboss/doctrine-dbal-timestamp-type

This package is abandoned and no longer maintained. No replacement package was suggested.

Add the timestamp type for Doctrine/DBAL

Installs: 155

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 10

Type:package

pkg:composer/ricardoboss/doctrine-dbal-timestamp-type

v2.0.1 2020-05-24 00:11 UTC

This package is auto-updated.

Last update: 2025-10-19 14:15:31 UTC


README

Since Doctrine/DBAL does not support the MySQL Timestamp type, you might want to add it on your own using this package.

Why using this?

According to this issue, Doctrine/DBAL does not support MySQL-specific database types like this one. Therefore, we must add it ourself.

Installation

composer require ricardoboss/doctrine-dbal-timestamp-type

Then add the type to Doctrine\DBAL:

\Doctrine\DBAL\Types\Type::addType('timestamp', 'MarkTopper\DoctrineDBALTimestampType\TimestampType');

Laravel 5

You can use the Laravel Provider to ensure that the type is added to Doctrine\DBAL by adding the following to providers:

MarkTopper\DoctrineDBALTimestampType\LaravelServiceProvider::class,

For Laravel > 5.5 this service provider will be loaded automatically.