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

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

ufo-tech/doctrine-behaviors
===========================

Doctrine Behavior Traits for symfony 7+ and Doctrine DBAL 4+ and Doctrine ORM 3+

1.0.4(9mo ago)88.1k↓21.7%1MITPHPPHP &gt;=8.2

Since Jan 13Pushed 9mo agoCompare

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

READMEChangelogDependencies (28)Versions (6)Used By (1)

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

[](#doctrine-behaviors)

Fork of a fork of [KnpLabs/DoctrineBehaviors](https://github.com/KnpLabs/DoctrineBehaviors) to ensure compatibility with Symfony 7+ and Doctrine DBAL 4+, addressing limitations in the original package, which was restricted to Symfony 6.3 and older versions of Doctrine.

This fork is maintained for use in modern Symfony projects and provides continued support for features like `Timestampable`, `Translatable`, `Blameable`, `SoftDeletable`, `Tree`, and `Uuid`. The original bundle does not work beyond Symfony 6.3, which makes it unsuitable for up-to-date projects.

Features
--------

[](#features)

This bundle includes the following Doctrine behaviors:

- **Timestampable**: Automatically handle `createdAt` and `updatedAt` fields.
- **Translatable**: Add support for translations in your entities.
- **Blameable**: Automatically set `createdBy` and `updatedBy` fields.
- **SoftDeletable**: Add support for soft deletes.
- **Tree**: Enable tree structures for your entities.
- **Uuid**: Support UUIDs as primary keys or identifiers.

Requirements
------------

[](#requirements)

- **PHP**: &gt;=8.2
- **Symfony**: ^7.0 | ^8.0
- **Doctrine DBAL**: ^3.2|^4.2
- **Doctrine ORM**: ^3.3
- **DoctrineBundle**: ^2.6

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

[](#installation)

Install via Composer:

```
composer require ufo-tech/doctrine-behaviors
```

Configuration
-------------

[](#configuration)

Enable the bundle in your Symfony project by adding it to bundles.php:

```
