datana-gmbh / doctrine-datetime-milliseconds-type
A Doctrine DBAL type to store DateTime with milliseconds
Installs: 132 673
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 5
Forks: 0
Open Issues: 0
Requires
- php: >=8.0
- datana-gmbh/doctrine-postgres-milliseconds-platform: ^2.0
- doctrine/dbal: ^3.4
Requires (Dev)
- datana-gmbh/doctrine-type-testcases: ^1.0.1
- ergebnis/composer-normalize: ^2.2
- ergebnis/test-util: ^1.5
- friendsofphp/php-cs-fixer: ^2.19
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^0.12.14
- phpstan/phpstan-webmozart-assert: ^0.12.2
- phpunit/phpunit: ^9.0
README
Usage
Installation
composer require datana-gmbh/doctrine-datetime-milliseconds-type
Setup
# config/packages/doctrine.yaml doctrine: dbal: types: # We want to store DateTime objects with milliseconds # The solution is built on https://github.com/doctrine/dbal/issues/2873#issuecomment-701052412 # but instead of using microseconds we use milliseconds datetime: Datana\Doctrine\Type\Doctrine\DBAL\Types\Type\DateTimeMillisecondsType