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

ActiveLibrary

restoclub/doctrine-extensions
=============================

Doctrine2 behavioral extensions

v2.4.31(8y ago)013MITPHPPHP &gt;=5.3.2

Since Jan 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Odar/DoctrineExtensions)[ Packagist](https://packagist.org/packages/restoclub/doctrine-extensions)[ Docs](http://gediminasm.org/)[ RSS](/packages/restoclub-doctrine-extensions/feed)WikiDiscussions v2.4.x Synced today

READMEChangelog (1)Dependencies (7)Versions (53)Used By (0)

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

[](#doctrine2-behavioral-extensions)

[![Build Status](https://camo.githubusercontent.com/83b59906986927244a3328ac4b52dd8f59b87ec69f771511f69963aefd707445/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f41746c616e74696331382f446f637472696e65457874656e73696f6e732e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/Atlantic18/DoctrineExtensions)[![Latest Stable Version](https://camo.githubusercontent.com/caeda3289e2b92b29a6e5fcaa9cf5a80d59ddd6f0ef7c6090371c8938f6fa8ec/68747470733a2f2f706f7365722e707567782e6f72672f6765646d6f2f646f637472696e652d657874656e73696f6e732f76657273696f6e)](https://packagist.org/packages/gedmo/doctrine-extensions)

**Note:** extensions might not evolve more after **2.4.x** it will remain stable and backward compatible. Unless new interested maintainers will take over the development and continue with **3.x** versions onward.

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

**Note:** Extensions **2.3.x** are compatible with ORM and doctrine common library versions from **2.2.x** to **2.4.x****Note:** If you are setting up entity manager without a framework, see the [example](/example/em.php) to prevent issues like #1310

### Latest updates

[](#latest-updates)

**2016-01-27**

- Nested tree now allows root field as association.

**2015-05-01**

- Reverted back [1272](https://github.com/Atlantic18/DoctrineExtensions/pull/1272) and see [1263](https://github.com/Atlantic18/DoctrineExtensions/issues/1263). Use [naming strategy](http://stackoverflow.com/questions/12702657/how-to-configure-naming-strategy-in-doctrine-2) for your use cases.
- Fixed bug for sortable [1279](https://github.com/Atlantic18/DoctrineExtensions/pull/1279)

**2015-03-26**

Support for ORM and Common library **2.5.0**. A minor version bump, because of trait column changes.

**2015-01-28**

Fixed the issue for all mappings, which caused related class mapping failures, when a relation or class name was in the same namespace, but extensions required it to be mapped as full classname.

**2015-01-21**

Fixed memory leak issue with entity or document wrappers for convenient metadata retrieval.

### Summary and features

[](#summary-and-features)

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. Additional mapping drivers can be easily implemented using Mapping extension to handle the additional metadata mapping.

**Note:** Please note, that xml mapping needs to be in a different namespace, the declared namespace for Doctrine extensions is So root node now looks like this:

**Note:** Use 2.1.x tag in order to use extensions based on Doctrine2.1.x versions. Currently master branch is based on 2.2.x versions and may not work with 2.1.x

```

...

```

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

- Latest version - ****
- 2.2.x version - ****
- 2.1.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:

- go to the root directory of extensions
- download composer: `wget https://getcomposer.org/composer.phar`
- install dev libraries: `php composer.phar install`
- run: `bin/phpunit -c tests`
- optional - run mongodb service if targeting mongo tests

### Running the example:

[](#running-the-example)

To setup and run example follow these steps:

- go to the root directory of extensions
- download composer: `wget https://getcomposer.org/composer.phar`
- install dev libraries: `php composer.phar 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)

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

31

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 64.7% 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 ~25 days

Total

51

Last Release

3155d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/517fe9bed3b9079bc085061ac6d3909f475bd3da30b4c92c5ca3af414e382d1e?d=identicon)[Odar](/maintainers/Odar)

---

Top Contributors

[![l3pp4rd](https://avatars.githubusercontent.com/u/132389?v=4)](https://github.com/l3pp4rd "l3pp4rd (878 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 (17 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)")[![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)")[![khepin](https://avatars.githubusercontent.com/u/455656?v=4)](https://github.com/khepin "khepin (9 commits)")[![alterphp](https://avatars.githubusercontent.com/u/738765?v=4)](https://github.com/alterphp "alterphp (9 commits)")[![birko](https://avatars.githubusercontent.com/u/1064302?v=4)](https://github.com/birko "birko (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 (8 commits)")[![dantudor](https://avatars.githubusercontent.com/u/1281127?v=4)](https://github.com/dantudor "dantudor (7 commits)")[![djlambert](https://avatars.githubusercontent.com/u/1187338?v=4)](https://github.com/djlambert "djlambert (7 commits)")[![iluuu1994](https://avatars.githubusercontent.com/u/1752683?v=4)](https://github.com/iluuu1994 "iluuu1994 (7 commits)")

---

Tags

sortabletreebehaviorsextensionsgedmosluggableloggabletranslatablenestedsettimestampableBlameableuploadabledoctrine2

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[gedmo/doctrine-extensions

Doctrine behavioral extensions

4.1k116.9M332](/packages/gedmo-doctrine-extensions)[stof/doctrine-extensions-bundle

Integration of the gedmo/doctrine-extensions with Symfony

1.9k83.9M342](/packages/stof-doctrine-extensions-bundle)[knplabs/doctrine-behaviors

Doctrine Behavior Traits

93612.6M55](/packages/knplabs-doctrine-behaviors)

PHPackages © 2026

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