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

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

karser/doctrine-extensions
==========================

Doctrine2 behavioral extensions

v2.3.9(12y ago)020MITPHPPHP &gt;=5.3.2

Since Jan 21Pushed 11y ago1 watchersCompare

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

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

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

[](#doctrine2-behavioral-extensions)

**Version 2.3.9**

[![Build Status](https://camo.githubusercontent.com/83b59906986927244a3328ac4b52dd8f59b87ec69f771511f69963aefd707445/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f41746c616e74696331382f446f637472696e65457874656e73696f6e732e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/Atlantic18/DoctrineExtensions)

**Note:** Extensions **2.3.x** are compatible with ORM and doctrine common library versions from **2.2.x** to **2.4.x**

### Latest updates

[](#latest-updates)

**2014-03-20**

**DoctrineExtensions** has [new home on github](https://github.com/Atlantic18/DoctrineExtensions) under an unbrella of [ORM designer](http://www.orm-designer.com/) organization. I'm sure there it will find much more improvements over the time and the original author of extensions will remain a core member of this project. The reason why it was moved elsewhere - is mainly because more enthusiastic people would bring more ideas to the project and remain interested in it's future, especially when it is related to their daily work and vision.

**2014-01-12**

- **Uploadable** filename support #915, #924, #910
- **Tree-MaterializedPath** fixed issue when a Proxy object was scheduled for removal #937
- **Sluggable** relation slug handler option to urlize non slug relation field #947
- **Sluggable** pass an object to urlizer #941
- **IpTraceable** new extension to trace ip addresses based on timestampable #912

### 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** - this extension automates the tree handling process and adds some tree specific functions on repository. (**closure**, **nestedset** or **materialized path**)
- **Translatable** - gives you a very handy solution for translating records into different languages. Easy to setup, easier to use.
- **Sluggable** - urlizes your specified fields into single unique slug
- **Timestampable** - updates date fields on create, update and even property change.
- **Blameable** - updates string or reference fields on create, update and even property change with a string or object (e.g. user).
- **Loggable** - helps tracking changes and history of objects, also supports version management.
- **Sortable** - makes any document or entity sortable
- **Translator** - explicit way to handle translations
- **Softdeleteable** - allows to implicitly remove records
- **Uploadable** - provides file upload handling in entity fields
- **References** - supports linking Entities in Documents and visa versa
- **IpTraceable** - 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
- Sortable

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

You can test these extensions on [my blog](http://gediminasm.org/demo "Test doctrine behavioral extensions"). All tutorials for basic usage examples are on [my blog](http://gediminasm.org "Tutorials for extensions") too. You can also fork or clone this blog from [github repository](https://github.com/l3pp4rd/gediminasm.org)

### Running the tests:

[](#running-the-tests)

PHPUnit 3.6 or newer is required. 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: `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

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 61% 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 ~51 days

Recently: every ~66 days

Total

15

Last Release

4504d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a010cb48160a17e197994687462680101cdb20284a1dce61f8704218a7ee87e4?d=identicon)[karser](/maintainers/karser)

---

Top Contributors

[![l3pp4rd](https://avatars.githubusercontent.com/u/132389?v=4)](https://github.com/l3pp4rd "l3pp4rd (686 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 (63 commits)")[![cevou](https://avatars.githubusercontent.com/u/1201681?v=4)](https://github.com/cevou "cevou (32 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)")[![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)")[![mnapoli](https://avatars.githubusercontent.com/u/720328?v=4)](https://github.com/mnapoli "mnapoli (11 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)")[![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)")[![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)")[![karser](https://avatars.githubusercontent.com/u/1675033?v=4)](https://github.com/karser "karser (8 commits)")[![djlambert](https://avatars.githubusercontent.com/u/1187338?v=4)](https://github.com/djlambert "djlambert (7 commits)")[![vetalt](https://avatars.githubusercontent.com/u/6026208?v=4)](https://github.com/vetalt "vetalt (7 commits)")[![dantudor](https://avatars.githubusercontent.com/u/1281127?v=4)](https://github.com/dantudor "dantudor (7 commits)")[![zhil](https://avatars.githubusercontent.com/u/981783?v=4)](https://github.com/zhil "zhil (6 commits)")

---

Tags

sortabletreebehaviorsextensionsgedmosluggableloggabletranslatablenestedsettimestampableBlameableuploadabledoctrine2

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/karser-doctrine-extensions/health.svg)](https://phpackages.com/packages/karser-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)
