toovalu-github/doctrine-behaviors
Doctrine Behaviors adds reusable entity traits and listeners to Doctrine ORM, including timestampable, sluggable, soft-deletable, blameable, and tree behavior, so common model logic stays out of your entities and your Laravel or PHP app stays clean.
Blameable + Loggable + SoftDeletable are the technical foundation for "who changed what, when, and can we recover it" — the questions behind audit-trail commitments, GDPR/erasure workflows, SOC 2 evidence, and enterprise security questionnaires. Decide whether audit history is a v1 requirement or a v2 upsell; this package makes v1 cheap.Translatable lets you commit to multi-locale content (EMEA/LATAM expansion, localized marketing or catalog) without redesigning schemas later. That's a market-entry decision this package de-risks.Sluggable supports SEO/public URL strategy; Tree supports category hierarchies, nested navigation, org charts, and threaded comments — each a discrete roadmap item that becomes a configuration choice rather than a build.knplabs/doctrine-behaviors." Zero dependents is a red flag for longevity, not a signal of quality.Adopt when:
laravel-doctrine/doctrine-bridge) and cannot cheaply switch.Timestampable alone is not worth the dependency.Look elsewhere when:
spatie/laravel-activitylog, cviebrock/eloquent-sluggable, spatie/laravel-translatable, kalnoy/nestedset, built-in SoftDeletes/timestamps) are better supported, better documented, and don't force a DBAL mental model on your team. Adopting Doctrine traits to get behaviors you can get natively is a net negative.Loggable writes to your OLTP schema and will become a scaling and PII-retention problem.To executives: This is a small, MIT-licensed library that gives us eight standard data-model capabilities — audit trails, soft delete/recovery, URL slugs, UUIDs, timestamps, translations, and category trees — off the shelf instead of built in-house. It's the difference between shipping audit and i18n as roadmap line items and shipping them as configuration. The caveat is maturity: it's an actively updated but low-adoption fork, so we'd pin and vendor it internally and treat it as code we own. Net: weeks of engineering saved on undifferentiated plumbing, with a contained and manageable maintenance cost.
To engineering: Doctrine2 behavior traits covering Blameable, Loggable, Sluggable, SoftDeletable, Uuidable, Timestampable, Translatable, and Tree — MIT, released April 2026. It's a low-traffic fork of the well-known KnpLabs behaviors, so we diff against upstream, pin the version, and vendor it if we proceed. Only worth it if we're already committed to Doctrine; if we're staying on Eloquent, use the native ecosystem equivalents instead and skip this entirely. Recommend a timeboxed spike: verify the fork's diff, confirm our Doctrine version compatibility, and measure the audit-log write path under realistic load before committing.
How can I help you explore Laravel packages today?