ufo-tech / doctrine-behaviors
Doctrine Behavior Traits for symfony 7+ and Doctrine DBAL 4+ and Doctrine ORM 3+
Installs: 31
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 301
Type:symfony-bundle
Requires
- php: >=8.2
- doctrine/common: ^3.3
- doctrine/dbal: ^3.2|^4.2
- doctrine/doctrine-bundle: ^2.6
- doctrine/orm: ^3.3
- doctrine/persistence: ^2.5|^3.0
- nette/utils: ^4.0
- ramsey/uuid: ^4.2
- symfony/cache: ^7.0|^8.0
- symfony/dependency-injection: ^7.0|^8.0
- symfony/framework-bundle: ^7.0|^8.0
- symfony/http-kernel: ^7.0|^8.0
- symfony/security-core: ^7.0|^8.0
- symfony/string: ^7.0|^8.0
- symfony/translation-contracts: ^2.4|^3.0|^4.0|^5.0
Requires (Dev)
- ext-pdo_mysql: *
- ext-pdo_pgsql: *
- ext-pdo_sqlite: *
- doctrine/annotations: ^1.13
- php-parallel-lint/php-parallel-lint: ^1.3
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^1.7.10
- phpstan/phpstan-doctrine: ^1.3
- phpstan/phpstan-phpunit: ^1.1
- phpunit/phpunit: ^9.5
- psr/log: ^1.1
- rector/rector: ^0.13.4
- symplify/easy-ci: ^10.2.9
- symplify/easy-coding-standard: ^10.2.9
- symplify/package-builder: ^10.2.9
- symplify/phpstan-extensions: ^10.2.9
- symplify/phpstan-rules: ^10.2.9
This package is auto-updated.
Last update: 2025-01-13 17:46:45 UTC
README
Fork of a fork of 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
This bundle includes the following Doctrine behaviors:
- Timestampable: Automatically handle
createdAt
andupdatedAt
fields. - Translatable: Add support for translations in your entities.
- Blameable: Automatically set
createdBy
andupdatedBy
fields. - SoftDeletable: Add support for soft deletes.
- Tree: Enable tree structures for your entities.
- Uuid: Support UUIDs as primary keys or identifiers.
Requirements
- PHP: >=8.2
- Symfony: ^7.0 | ^8.0
- Doctrine DBAL: ^3.2|^4.2
- Doctrine ORM: ^3.3
- DoctrineBundle: ^2.6
Installation
Install via Composer:
composer require ufo-tech/doctrine-behaviors
Configuration
Enable the bundle in your Symfony project by adding it to bundles.php:
<?php return [ // Other bundles Ufo\DoctrineBehaviors\DoctrineBehaviorsBundle::class => ['all' => true], ];