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

ActiveLibrary

teltek/doctrine-extensions
==========================

Doctrine2 behavioral extensions

1.0.0(8y ago)02.1kMITPHPPHP &gt;=5.3.2

Since Jul 30Pushed 6y ago7 watchersCompare

[ Source](https://github.com/teltek/DoctrineExtensions)[ Packagist](https://packagist.org/packages/teltek/doctrine-extensions)[ Docs](http://gediminasm.org/)[ RSS](/packages/teltek-doctrine-extensions/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (4)Used By (0)

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

[](#doctrine-behavioral-extensions)

[![Build Status](https://camo.githubusercontent.com/e0c5f918e02ea25e67546b7138796a735de86d6a9ea05cbefadd81e58c983c11/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f41746c616e74696331382f446f637472696e65457874656e73696f6e732e706e67)](http://travis-ci.org/Atlantic18/DoctrineExtensions)[![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.

---

##### ⚠️ The `master` branch is for development on Doctrine Extensions 3.0.

[](#warning-the-master-branch-is-for-development-on-doctrine-extensions-30)

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

- Bumping minimum version requirements of PHP, Doctrine, and other dependencies
- Updating the test suite, add code and style standards, and other needed build tools
- Cleaning up documentation, code, comments, etc.

While major code changes are not expected initially for 3.0, it will be a major release due to changes in requirements and toolsets.

For the current stable version, see the [v2.4.x branch](https://github.com/Atlantic18/DoctrineExtensions/tree/v2.4.x).

---

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

[](#installation)

```
$ composer require gedmo/doctrine-extensions

```

- [Symfony 2](/doc/symfony2.md)
- [Symfony 4](/doc/symfony4.md)
- [Laravel 5](https://www.laraveldoctrine.org/docs/1.3/extensions)
- [Zend Framework 2](/doc/zendframework2.md)

### Upgrading

[](#upgrading)

- [From v2.4.x to v3.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 **YAML**, **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 [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 [Lando](https://docs.devwithlando.io/), a Docker-based dev environment tool
- Run `lando start` from the project root
- Make sure you `composer install` project dependencies
- Run `lando php 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: `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 Doctrine 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 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

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

3020d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1632294?v=4)[Pablo Nieto](/maintainers/pnieto)[@pnieto](https://github.com/pnieto)

---

Top Contributors

[![l3pp4rd](https://avatars.githubusercontent.com/u/132389?v=4)](https://github.com/l3pp4rd "l3pp4rd (916 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)")[![AkenRoberts](https://avatars.githubusercontent.com/u/563886?v=4)](https://github.com/AkenRoberts "AkenRoberts (74 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)")[![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)")[![Slamdunk](https://avatars.githubusercontent.com/u/152236?v=4)](https://github.com/Slamdunk "Slamdunk (10 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)")[![delboy1978uk](https://avatars.githubusercontent.com/u/2684575?v=4)](https://github.com/delboy1978uk "delboy1978uk (9 commits)")[![julesbou](https://avatars.githubusercontent.com/u/328303?v=4)](https://github.com/julesbou "julesbou (8 commits)")[![iluuu1994](https://avatars.githubusercontent.com/u/1752683?v=4)](https://github.com/iluuu1994 "iluuu1994 (8 commits)")

---

Tags

sortabletreebehaviorsextensionsgedmosluggableloggabletranslatablenestedsettimestampableBlameableuploadabledoctrine2

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[gedmo/doctrine-extensions

Doctrine behavioral extensions

4.1k118.8M365](/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)
