Skip to content

A symfony bundle to add created and updated timestamps to doctrine entities.

Notifications You must be signed in to change notification settings

francisfuzz/TimestampableBundle

Repository files navigation

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/timestampablebundle

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)

About

A symfony bundle to add created and updated timestamps to doctrine entities.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages