Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

DoctrineBehaviors

> 数据库
Open source

Doctrine2 behavior traits that help handling Blameable, Loggable, Sluggable, SoftDeletable, Uuidable, Timestampable, Translatable, Tree behavior

923 stars0 likes1 views
WebsiteGitHub

About

Doctrine2 behavior traits that help handling Blameable, Loggable, Sluggable, SoftDeletable, Uuidable, Timestampable, Translatable, Tree behavior

Doctrine Behaviors

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

It currently handles:

  • Blameable
  • Loggable
  • Sluggable
  • SoftDeletable
  • Uuidable
  • Timestampable
  • Translatable
  • Tree

Install

bash
composer require knplabs/doctrine-behaviors

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:

php
import(DoctrineSetList::DOCTRINE_BEHAVIORS_20);
};

Run Rector:

bash
vendor/bin/rector process src

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPbehaviordoctrinedoctrine2orm

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库