Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Doctrine Behaviors Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for cross-cutting model concerns. Blameable, Timestampable, Sluggable, SoftDeletable, Uuidable, Loggable, Translatable, and Tree are behaviors nearly every CRUD product reinvents. This package converts ~2–4 engineer-weeks of boilerplate into trait imports, freeing roadmap capacity for differentiating features.
  • Compliance and audit roadmap. 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.
  • Internationalization as a feature, not a refactor. 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.
  • Content and taxonomy features. 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.
  • Migration/portability decisions. Because it's a Doctrine ORM library, adoption implicitly commits you to Doctrine over Eloquent. That is an architecture decision with hiring, tooling, and ecosystem consequences — treat it as a platform bet, not a library pick.
  • Supply-chain risk posture. 0 stars, 0 dependents, and a single-vendor fork identity mean this is effectively unvetted third-party code. The PM decision is not "yes/no" but "yes, vendored and pinned internally" vs. "no, use the upstream knplabs/doctrine-behaviors." Zero dependents is a red flag for longevity, not a signal of quality.
  • Last release 2026-04-21 suggests active maintenance on the fork, which partially offsets the popularity gap — but verify the diff against upstream before assuming it's a superset.

When to Consider This Package

Adopt when:

  • You are already on Doctrine ORM (Symfony, or Laravel via laravel-doctrine/doctrine-bridge) and cannot cheaply switch.
  • You need three or more of the eight behaviors — the value scales with bundle usage; importing it for Timestampable alone is not worth the dependency.
  • Audit/compliance or i18n is on the near-term roadmap and you want it in the data model now.
  • You can fork, vendor, or pin the dependency and own the upgrade path internally. With 0 dependents, you are the maintainer of last resort — budget for that.

Look elsewhere when:

  • You are a standard Laravel/Eloquent shop. This is the most likely disqualifier. Eloquent-native equivalents (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.
  • You need event-sourced or externalized audit (append-only log service, CDC, warehouse) — Loggable writes to your OLTP schema and will become a scaling and PII-retention problem.
  • Popularity and ecosystem support are hard requirements in your dependency policy — 0 stars / 0 dependents will fail most security reviews as-is.
  • You need vendor-backed SLAs or a support contract.
  • Only one behavior is needed.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource