incompass/timestampable-bundle

Simple, efficient timestamps for symfony with doctrine

Installs: 40 756

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 10

Forks: 1

Type:symfony-bundle

v3.0.0 2023-01-20 19:42 UTC

README

Build Status Total Downloads Latest Stable Version

TimestampableBundle

This bundle allows you to simply add use TimestampInterface and use TimestampTrait to a doctrine entity class to have it automatically add created_at and updated_at fields and to have them updated on insert and update.

Installation

Composer

composer require incompass/timestampable-bundle

Usage

Add the TimestampInterface to your doctrine entities.

class {Entity} implements TimestampInterface

Add the TimestampTrait trait to your doctrine entities.

use TimestampTrait

Update your database schema

php bin/console doctrine:schema:update --force

All entities will now be saved with created_at and updated_at fields populated.

Contributors

Joe Mizzi (casechek/incompass)