PHPackages                             lockuser/doctrine-behaviors - 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. lockuser/doctrine-behaviors

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

lockuser/doctrine-behaviors
===========================

Doctrine Behavior Traits

2.0.0(7mo ago)0201MITPHPPHP &gt;=8.0

Since Apr 26Pushed 7mo agoCompare

[ Source](https://github.com/lockuser/DoctrineBehaviors)[ Packagist](https://packagist.org/packages/lockuser/doctrine-behaviors)[ Docs](http://knplabs.com)[ RSS](/packages/lockuser-doctrine-behaviors/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (28)Versions (4)Used By (0)

Doctrine Behaviors
==================

[](#doctrine-behaviors)

[![Downloads](https://camo.githubusercontent.com/772ed890e025833d9c7182f07014cd461e5354f7105350c6a1d9e4f05296c36e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6e706c6162732f646f637472696e652d6265686176696f72732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/knplabs/doctrine-behaviors)

This PHP library is a collection of traits and interfaces that add behaviors to Doctrine entities and repositories.

It currently handles:

- [Blameable](/docs/blameable.md)
- [Loggable](/docs/loggable.md)
- [Sluggable](/docs/sluggable.md)
- [SoftDeletable](/docs/soft-deletable.md)
- [Uuidable](/docs/uuidable.md)
- [Timestampable](/docs/timestampable.md)
- [Translatable](/docs/translatable.md)
- [Tree](/docs/tree.md)

Install
-------

[](#install)

```
composer require knplabs/doctrine-behaviors
```

Usage
-----

[](#usage)

All you have to do is to define a Doctrine entity:

- implemented interface
- add a trait

For some behaviors like tree, you can use repository traits:

```
