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

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

ttl/doctrine-extensions
=======================

Doctrine behavioral extensions

3.13(2y ago)03451MITPHPPHP ^7.2 || ^8.0

Since Sep 5Pushed 2y agoCompare

[ Source](https://github.com/takethelead/DoctrineExtensions)[ Packagist](https://packagist.org/packages/ttl/doctrine-extensions)[ Docs](http://gediminasm.org/)[ GitHub Sponsors](https://github.com/l3pp4rd)[ GitHub Sponsors](https://github.com/mbabker)[ RSS](/packages/ttl-doctrine-extensions/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (24)Versions (3)Used By (1)

Doctrine Behavioral Extensions
==============================

[](#doctrine-behavioral-extensions)

[![Continuous Integration](https://github.com/doctrine-extensions/DoctrineExtensions/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/doctrine-extensions/DoctrineExtensions/actions/workflows/continuous-integration.yml)[![Quality Assurance](https://github.com/doctrine-extensions/DoctrineExtensions/actions/workflows/qa.yml/badge.svg)](https://github.com/doctrine-extensions/DoctrineExtensions/actions/workflows/qa.yml)[![Coding Standards](https://github.com/doctrine-extensions/DoctrineExtensions/actions/workflows/coding-standards.yml/badge.svg)](https://github.com/doctrine-extensions/DoctrineExtensions/actions/workflows/coding-standards.yml)[![Latest Stable Version](https://camo.githubusercontent.com/caeda3289e2b92b29a6e5fcaa9cf5a80d59ddd6f0ef7c6090371c8938f6fa8ec/68747470733a2f2f706f7365722e707567782e6f72672f6765646d6f2f646f637472696e652d657874656e73696f6e732f76657273696f6e)](https://packagist.org/packages/gedmo/doctrine-extensions)

This package contains extensions for Doctrine ORM and MongoDB ODM that offer new functionality or tools to use Doctrine more efficiently. These behaviors can be easily attached to the event system of Doctrine and handle the records being flushed in a behavioral way.

---

Doctrine Extensions 3.0 Released 🎉
----------------------------------

[](#doctrine-extensions-30-released-tada)

3.0 focuses on refreshing this package for today's PHP. This includes:

- Bumping minimum version requirements of PHP, Doctrine, and other dependencies
- Implementing support for the latest Doctrine MongoDB &amp; Common packages
- Updating the test suite, add code and style standards, and other needed build tools
- Cleaning up documentation, code, comments, etc.

[Read the Upgrade Doc for more info.](/doc/upgrading/upgrade-v2.4-to-v3.0.md)

---

Installation
------------

[](#installation)

```
composer require gedmo/doctrine-extensions

```

- [Symfony 4](/doc/symfony4.md)
- [Laravel 5](https://www.laraveldoctrine.org/docs/1.3/extensions)
- [Laminas](/doc/laminas.md)

### Upgrading

[](#upgrading)

- [From 2.4.x to 3.0](/doc/upgrading/upgrade-v2.4-to-v3.0.md)

Extensions
----------

[](#extensions)

#### ORM &amp; MongoDB ODM

[](#orm--mongodb-odm)

- [**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.
- [**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.
- [**Translatable**](/doc/translatable.md) - gives you a very handy solution for translating records into different languages. Easy to setup, easier to use.
- [**Tree**](/doc/tree.md) - automates the tree handling process and adds some tree-specific functions on repository. (**closure**, **nested set** or **materialized path**) *(MongoDB ODM only supports materialized path)*

#### ORM Only

[](#orm-only)

- [**IpTraceable**](/doc/ip_traceable.md) - inherited from Timestampable, sets IP address instead of timestamp
- [**SoftDeleteable**](/doc/softdeleteable.md) - allows to implicitly remove records
- [**Sortable**](/doc/sortable.md) - makes any document or entity sortable
- [**Uploadable**](/doc/uploadable.md) - provides file upload handling in entity fields

#### MongoDB ODM Only

[](#mongodb-odm-only)

- [**References**](/doc/references.md) - supports linking Entities in Documents and vice versa
- [**ReferenceIntegrity**](/doc/reference_integrity.md) - constrains ODM MongoDB Document references

All extensions support **Attribute**, **Annotation** and **XML** mapping. Additional mapping drivers can be easily implemented using Mapping extension to handle the additional metadata mapping.

### Version Compatibility

[](#version-compatibility)

Extensions VersionCompatible Doctrine ORM &amp; Common Library2.42.5+2.32.2 - 2.4If you are setting up the Entity Manager without a framework, see the [example](/example/em.php) to prevent issues like #1310

### XML Mapping

[](#xml-mapping)

XML mapping needs to be in a different namespace, the declared namespace for Doctrine extensions is So root node now looks like this:

```

...

```

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

- Latest version - ****
- 2.2.x version - ****
- 2.1.x version - ****

### Running Tests

[](#running-tests)

To set up and run the tests, follow these steps:

- Install [Docker](https://www.docker.com/) and ensure you have `docker compose`
- From the project root, run `docker compose up -d` to start containers in daemon mode
- Enter the container via `docker compose exec php bash` (you are now in the root directory: `/var/www`)
- Install Composer dependencies via `composer install`
- Run the tests: `bin/phpunit -c tests/`

### Running the Example

[](#running-the-example)

To set up and run example, follow these steps:

- go to the root directory of extensions
- [download composer](https://getcomposer.org/download/)
- install dev libraries: `composer install`
- edit `example/em.php` and configure your database on top of the file
- run: `php example/bin/console` or `php example/bin/console` for console commands
- run: `php example/bin/console orm:schema-tool:create` to create the schema
- run: `php example/bin/console app:print-category-translation-tree` to run the example to print the category translation tree

### Contributors

[](#contributors)

Thanks to [everyone participating](https://github.com/doctrine-extensions/DoctrineExtensions/contributors) in the development of these great Doctrine extensions!

And especially ones who create and maintain new extensions:

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52% 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

Unknown

Total

1

Last Release

978d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/53b16c4a2775033e746092b3545f3e67cf8c441da7d35f1bbe40e76c37cfd3ec?d=identicon)[Mosky](/maintainers/Mosky)

---

Top Contributors

[![l3pp4rd](https://avatars.githubusercontent.com/u/132389?v=4)](https://github.com/l3pp4rd "l3pp4rd (916 commits)")[![phansys](https://avatars.githubusercontent.com/u/1231441?v=4)](https://github.com/phansys "phansys (122 commits)")[![franmomu](https://avatars.githubusercontent.com/u/720690?v=4)](https://github.com/franmomu "franmomu (118 commits)")[![AkenRoberts](https://avatars.githubusercontent.com/u/563886?v=4)](https://github.com/AkenRoberts "AkenRoberts (116 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)")[![Slamdunk](https://avatars.githubusercontent.com/u/152236?v=4)](https://github.com/Slamdunk "Slamdunk (14 commits)")[![mitrae](https://avatars.githubusercontent.com/u/1278440?v=4)](https://github.com/mitrae "mitrae (13 commits)")[![mbabker](https://avatars.githubusercontent.com/u/368545?v=4)](https://github.com/mbabker "mbabker (13 commits)")[![WesleyVanOpdorp](https://avatars.githubusercontent.com/u/3276853?v=4)](https://github.com/WesleyVanOpdorp "WesleyVanOpdorp (11 commits)")[![everzet](https://avatars.githubusercontent.com/u/30813?v=4)](https://github.com/everzet "everzet (11 commits)")[![mnapoli](https://avatars.githubusercontent.com/u/720328?v=4)](https://github.com/mnapoli "mnapoli (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)")

---

Tags

ormdoctrinesortabletreeodmbehaviorsextensionsgedmosluggableloggabletranslatablenestedsettimestampableBlameableuploadable

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[gedmo/doctrine-extensions

Doctrine behavioral extensions

4.1k118.8M366](/packages/gedmo-doctrine-extensions)[stof/doctrine-extensions-bundle

Integration of the gedmo/doctrine-extensions with Symfony

1.9k85.3M381](/packages/stof-doctrine-extensions-bundle)[knplabs/doctrine-behaviors

Doctrine Behavior Traits

92212.7M64](/packages/knplabs-doctrine-behaviors)

PHPackages © 2026

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