PHPackages                             fcpauldiaz/doctrine-extensions - 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. fcpauldiaz/doctrine-extensions

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

fcpauldiaz/doctrine-extensions
==============================

Doctrine2 behavioral extensions

v2.4.23(9y ago)03381MITPHPPHP &gt;=5.4

Since Jan 21Pushed 9y ago2 watchersCompare

[ Source](https://github.com/Newton-Labs/DoctrineExtensions)[ Packagist](https://packagist.org/packages/fcpauldiaz/doctrine-extensions)[ Docs](http://gediminasm.org/)[ RSS](/packages/fcpauldiaz-doctrine-extensions/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (7)Versions (49)Used By (1)

Doctrine2 behavioral extensions
===============================

[](#doctrine2-behavioral-extensions)

**Version 3.0.0**

[![Build Status](https://camo.githubusercontent.com/83b59906986927244a3328ac4b52dd8f59b87ec69f771511f69963aefd707445/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f41746c616e74696331382f446f637472696e65457874656e73696f6e732e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/Atlantic18/DoctrineExtensions)[![Total Downloads](https://camo.githubusercontent.com/fe78ac4612b358baa4a09692cc606e01af1ed2b4e1df0b1606605b8787aa22f2/68747470733a2f2f706f7365722e707567782e6f72672f6765646d6f2f646f637472696e652d657874656e73696f6e732f646f776e6c6f6164732e706e67)](https://packagist.org/packages/gedmo/doctrine-extensions)[![Latest Stable Version](https://camo.githubusercontent.com/3fe865224be54cc091febb597647fd981d8781a5c893401ceb9b1989ca1a3c22/68747470733a2f2f706f7365722e707567782e6f72672f6765646d6f2f646f637472696e652d657874656e73696f6e732f762f737461626c652e706e67)](https://packagist.org/packages/gedmo/doctrine-extensions)

**Note:** Extensions **3.0.x** are compatible with **ORM** and doctrine common libraries from **2.5.x** and requires **PHP 5.4** or higher. Extensions **2.4.x** are compatible with ORM and doctrine common library versions from **2.2.x** to **2.5.x**

Since the author has stopped working with PHP, looking for maintainers to ensure stability of doctrine extensions.

### Latest updates

[](#latest-updates)

**2016-01-27**

- Nested tree now allows **root** field as association.
- Sortable supports more than one sortable field per entity, has **BC** changes.
- Uploadable supports more than one file per entity, may have implicit **BC** change if users have used their custom **FilenameGeneratorInterface** see [\#1342](https://github.com/Atlantic18/DoctrineExtensions/pull/1342).

**2015-12-27**

- From now on, extensions will require **php 5.4** or higher.
- All trait column names will refer to naming strategy and won't be explicitly set by extensions.
- Tree repositories are now using traits, for easier extensions.

### Extensions and Documentation

[](#extensions-and-documentation)

This package contains extensions for Doctrine2 that hook into the facilities of Doctrine and offer new functionality or tools to use Doctrine2 more efficiently. This package contains mostly used behaviors which can be easily attached to your event system of Doctrine2 and handle the records being flushed in the behavioral way. List of extensions:

- [**Tree**](/doc/tree.md) - this extension automates the tree handling process and adds some tree specific functions on repository. (**closure**, **nestedset** or **materialized path**)
- [**Translatable**](/doc/translatable.md) - gives you a very handy solution for translating records into different languages. Easy to setup, easier to use.
- [**Sluggable**](/doc/sluggable.md) - urlizes your specified fields into single unique slug
- [**Timestampable**](/doc/timestampable.md) - updates date fields on create, update and even property change.
- [**Blameable**](/doc/blameable.md) - updates string or reference fields on create, update and even property change with a string or object (e.g. user).
- [**Loggable**](/doc/loggable.md) - helps tracking changes and history of objects, also supports version management.
- [**Sortable**](/doc/sortable.md) - makes any document or entity sortable
- [**Translator**](/doc/translatable.md) - explicit way to handle translations
- [**SoftDeleteable**](/doc/softdeleteable.md) - allows to implicitly remove records
- [**Uploadable**](/doc/uploadable.md) - provides file upload handling in entity fields
- [**References**](/doc/references.md) - supports linking Entities in Documents and vice versa
- [**ReferenceIntegrity**](/doc/reference_integrity.md) - constrains ODM MongoDB Document references
- [**IpTraceable**](/doc/ip_traceable.md) - inherited from Timestampable, sets IP address instead of timestamp

Currently these extensions support **Yaml**, **Annotation** and **Xml** mapping.

**Note:** Please note, that xml mapping needs to be in a different namespace, the declared namespace for Doctrine extensions is [doctrine-extensions.xsd](http://atlantic18.github.io/DoctrineExtensions/schemas/orm/doctrine-extensions.xsd)So root node now looks like this:

```

...

```

XML mapping xsd schemas are also versioned and can be used by version suffix:

- Latest version - ****
- 2.4.x version - ****
- 3.0.x version - ****

### ODM MongoDB support

[](#odm-mongodb-support)

List of extensions which support ODM

- Translatable
- Sluggable
- Timestampable
- Blameable
- Loggable
- Translator
- Tree (Materialized Path strategy for now)
- References
- ReferenceIntegrity

All these extensions can be nested together and mapped in traditional ways - **annotations**, **xml** or **yaml**

### Running the tests:

[](#running-the-tests)

**pdo-sqlite** extension is necessary. To setup and run tests follow these steps:

- install dev libraries: `composer install`
- run: `bin/phpunit -c tests`
- optional - run mongodb service if targeting mongo tests

**NOTE:** if php7 is used with **mongodb** install extension and dependencies using composer7.json. This is a temporary hack until the better ODM support is available.

### Running the example:

[](#running-the-example)

To setup and run example follow these steps:

- go to the root directory of extensions
- install dev libraries: `composer install`
- edit `example/em.php` and configure your database on top of the file
- run: `./example/bin/console` or `php example/bin/console` for console commands
- run: `./example/bin/console orm:schema-tool:create` to create schema
- run: `php example/run.php` to run example

### Contributors:

[](#contributors)

**NOTE:** composer7.json is only used to test extensions with ODM mongodb using php7, same for travis.

Thanks to [everyone participating](http://github.com/l3pp4rd/DoctrineExtensions/contributors) in the development of these great Doctrine2 extensions!

And especially ones who create and maintain new extensions:

- Lukas Botsch [lbotsch](http://github.com/lbotsch)
- Gustavo Adrian [comfortablynumb](http://github.com/comfortablynumb)
- Boussekeyt Jules [gordonslondon](http://github.com/gordonslondon)
- Kudryashov Konstantin [everzet](http://github.com/everzet)
- David Buchmann [dbu](https://github.com/dbu)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 64.6% 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 ~40 days

Recently: every ~11 days

Total

43

Last Release

3578d ago

PHP version history (2 changes)v2.2.0PHP &gt;=5.3.2

v2.4.23PHP &gt;=5.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4523284?v=4)[Pablo Díaz](/maintainers/fcpauldiaz)[@fcpauldiaz](https://github.com/fcpauldiaz)

---

Top Contributors

[![l3pp4rd](https://avatars.githubusercontent.com/u/132389?v=4)](https://github.com/l3pp4rd "l3pp4rd (891 commits)")[![comfortablynumb](https://avatars.githubusercontent.com/u/556188?v=4)](https://github.com/comfortablynumb "comfortablynumb (116 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (83 commits)")[![cevou](https://avatars.githubusercontent.com/u/1201681?v=4)](https://github.com/cevou "cevou (34 commits)")[![ejsidisi](https://avatars.githubusercontent.com/u/2768851?v=4)](https://github.com/ejsidisi "ejsidisi (26 commits)")[![lbotsch](https://avatars.githubusercontent.com/u/224285?v=4)](https://github.com/lbotsch "lbotsch (25 commits)")[![Alsatian67](https://avatars.githubusercontent.com/u/7631072?v=4)](https://github.com/Alsatian67 "Alsatian67 (18 commits)")[![dbu](https://avatars.githubusercontent.com/u/76576?v=4)](https://github.com/dbu "dbu (14 commits)")[![mitrae](https://avatars.githubusercontent.com/u/1278440?v=4)](https://github.com/mitrae "mitrae (13 commits)")[![Padam87](https://avatars.githubusercontent.com/u/776488?v=4)](https://github.com/Padam87 "Padam87 (13 commits)")[![WesleyVanOpdorp](https://avatars.githubusercontent.com/u/3276853?v=4)](https://github.com/WesleyVanOpdorp "WesleyVanOpdorp (11 commits)")[![mnapoli](https://avatars.githubusercontent.com/u/720328?v=4)](https://github.com/mnapoli "mnapoli (11 commits)")[![everzet](https://avatars.githubusercontent.com/u/30813?v=4)](https://github.com/everzet "everzet (11 commits)")[![birko](https://avatars.githubusercontent.com/u/1064302?v=4)](https://github.com/birko "birko (10 commits)")[![alterphp](https://avatars.githubusercontent.com/u/738765?v=4)](https://github.com/alterphp "alterphp (9 commits)")[![khepin](https://avatars.githubusercontent.com/u/455656?v=4)](https://github.com/khepin "khepin (9 commits)")[![julesbou](https://avatars.githubusercontent.com/u/328303?v=4)](https://github.com/julesbou "julesbou (8 commits)")[![vetalt](https://avatars.githubusercontent.com/u/6026208?v=4)](https://github.com/vetalt "vetalt (7 commits)")[![djlambert](https://avatars.githubusercontent.com/u/1187338?v=4)](https://github.com/djlambert "djlambert (7 commits)")[![dantudor](https://avatars.githubusercontent.com/u/1281127?v=4)](https://github.com/dantudor "dantudor (7 commits)")

---

Tags

sortabletreebehaviorsextensionsgedmosluggableloggabletranslatablenestedsettimestampableBlameableuploadabledoctrine2

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fcpauldiaz-doctrine-extensions/health.svg)

```
[![Health](https://phpackages.com/badges/fcpauldiaz-doctrine-extensions/health.svg)](https://phpackages.com/packages/fcpauldiaz-doctrine-extensions)
```

###  Alternatives

[gedmo/doctrine-extensions

Doctrine behavioral extensions

4.1k122.6M412](/packages/gedmo-doctrine-extensions)[stof/doctrine-extensions-bundle

Integration of the gedmo/doctrine-extensions with Symfony

1.9k88.1M434](/packages/stof-doctrine-extensions-bundle)[knplabs/doctrine-behaviors

Doctrine Behavior Traits

92312.9M68](/packages/knplabs-doctrine-behaviors)

PHPackages © 2026

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