PHPackages                             mof/timestampable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. mof/timestampable

ActiveLibrary[Database &amp; ORM](/categories/database)

mof/timestampable
=================

Generates automatically creation and update's date of Doctrine entity property

v2.1.0(6y ago)0221MITPHPPHP ^7.0

Since Jul 7Pushed 1y agoCompare

[ Source](https://github.com/RyanFarrah67/Timestampable)[ Packagist](https://packagist.org/packages/mof/timestampable)[ RSS](/packages/mof-timestampable/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (1)

[![Build Status](https://camo.githubusercontent.com/198819b6a33ac4d0f942c2274a834e6f033eae4a2cdb0dcb50c9f69c2be2b136/68747470733a2f2f7472617669732d63692e6f72672f5279616e46617272616836372f54696d657374616d7061626c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/RyanFarrah67/Timestampable)

Presentation
============

[](#presentation)

This little library for Doctrine projects allows you to automatically handle creation and update on certain properties of your entity.

How install
-----------

[](#how-install)

You need to install it via composer :

`composer require mof/timestampable`

Then you need to register the annotations and add the event subscriber to the Doctrine event manager :

`AnnotationRegistry::registerLoader('class_exists'); //This register the annotation`

```
$annotationReader = new AnnotationReader();
$eventManager->addEventSubscriber(new TimestampableSubscriber($annotationReader));

```

You can give to the TimestampableSubcriber constructor any class that implements the `Doctrine\Common\Annotations\Reader` interface.

Then you ready to go.

Usage
-----

[](#usage)

In your entity, you can add the events the property will listen to, there are 2 events available :

```
/**
 * When an entity is created
 * @var \DateTime
 * @ORM\Column(type="datetime", name="created_at")
 * @Timestampable(on=Timestampable::ON_CREATE)
 */
protected $createdAt;

```

```
/**
 * When an entity is updated (the date is also set when an entity is created)
 * @var \DateTime
 * @ORM\Column(type="datetime", name="updated_at")
 * @Timestampable(on=Timestampable::ON_UPDATE)
 */
protected $updatedAt;

```

Tests
-----

[](#tests)

You can run the tests by cloning the project and then type :

```
composer install
vendor/bin/codecept run

```

The tests use sqlite for the database behind the scene, for more information, see .

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

4

Last Release

2544d ago

Major Versions

v1.0.1 → v2.0.02019-07-13

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24453700?v=4)[Farrah Ryan](/maintainers/RyanFarrah67)[@RyanFarrah67](https://github.com/RyanFarrah67)

---

Top Contributors

[![RyanFarrah67](https://avatars.githubusercontent.com/u/24453700?v=4)](https://github.com/RyanFarrah67 "RyanFarrah67 (24 commits)")

### Embed Badge

![Health badge](/badges/mof-timestampable/health.svg)

```
[![Health](https://phpackages.com/badges/mof-timestampable/health.svg)](https://phpackages.com/packages/mof-timestampable)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M384](/packages/easycorp-easyadmin-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[oro/platform

Business Application Platform (BAP)

645143.5k114](/packages/oro-platform)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k59](/packages/open-dxp-opendxp)[api-platform/doctrine-orm

Doctrine ORM bridge

294.4M90](/packages/api-platform-doctrine-orm)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
