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

awstudio/doctrine-behaviors

awstudio/doctrine-behaviors provides reusable Doctrine behavior traits for Laravel and PHP applications, helping add common entity features such as timestamps, soft deletes, slugs, blameable users, sorting, and tree support with less boilerplate.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Reusable behavior modeling for core domain objects. The trait set (timestamps, soft-delete, slugs, authorship/blame, translations, tree/nested-set, change logging) maps directly to recurring product asks. Treat it as a checklist when scoping an entity model: which of these behaviors do our core objects need, and do we build them once as shared traits or repeat them per entity?
  • Build vs. buy vs. borrow. This is not really a vendor decision — it is a "do we adopt a behavior library or hand-roll traits" decision. The package is small (traits over Doctrine entities), so the real cost is ownership and upgrade maintenance, not licensing (MIT).
  • Roadmap enablers. Each behavior unlocks a feature line: i18n/localized content (Translatable), SEO-friendly URLs (Sluggable), recoverable deletes and admin "trash" views (SoftDeletable), audit/compliance trails (Timestampable, Blameable, Loggable), category/nav hierarchies (Tree). Useful for sizing epics and identifying shared platform work.
  • Consistency as a product quality goal. Standardizing audit fields and soft-delete semantics across entities reduces support tickets ("why did this record disappear?") and simplifies data-retention conversations with legal/security.
  • Prioritization signal, not a dependency signal. With 1 star, 0 dependents, and a last release in May 2018, the package itself should not drive roadmap decisions. Its value to a PM is as a catalog of cross-cutting concerns worth funding.

When to Consider This Package

Adopt only if all of the following hold:

  • You are already committed to Doctrine ORM — a Symfony application, or a Laravel app running laravel-doctrine/orm rather than Eloquent.
  • You need at least three or four of the behaviors, so the trait reuse actually pays for itself.
  • You are prepared to vendor/fork it and own it: pin the source, audit the traits, and accept that no upstream will ship Doctrine 3 / PHP 8.x compatibility fixes.
  • The behaviors are non-critical (timestamps, slugs) or you have tests around the critical ones (soft-delete filtering, translation fallbacks).

Look elsewhere when:

  • You are on stock Laravel/Eloquent. This package does nothing for Eloquent models; use Eloquent-native equivalents (spatie/laravel-sluggable, soft-delete traits, astrotomic/laravel-translatable) or write the four or five traits yourself — it is a day of work, not a quarter.
  • You want a maintained upstream. Prefer knplabs/doctrine-behaviors, from which this appears to derive; it has the community, the issue tracker, and the version compatibility work.
  • Compliance, audit, or PII requirements are in scope. An unmaintained dependency in the persistence layer is a supply-chain and correctness risk you should not accept for regulated data.
  • You are on modern PHP/Doctrine. A 2018 release predates several major Doctrine and PHP versions; expect friction during upgrades with no one to escalate to.

Default recommendation: borrow the pattern, not the dependency. Document the trait design internally and implement it against your own base entity.

How to Pitch It (Stakeholders)

For executives: This is a small, MIT-licensed library of Doctrine entity traits that standardizes timestamps, soft deletes, slugs, authorship, translations, and change logs — the plumbing behind audit trails, multi-language content, and "restore deleted item" features. It is cheap to evaluate but effectively unmaintained (one star, no dependents, last release 2018), so I do not recommend taking it as a production dependency. Instead I recommend we adopt the pattern — either via the maintained upstream project or roughly one engineer-week of in-house traits — which gets us the same consistency with a supportable owner.

For engineering: Treat the package as a design reference. The trait list is a good spec for a small internal Behaviors bundle: Timestampable, SoftDeletable, Sluggable, Blameable, Translatable, Loggable. If we do pull it in, fork it, pin the commit, add tests around soft-delete query filtering and translation fallback, and put it on the upgrade checklist for every Doctrine major. If the team is Eloquent-based, skip it entirely — the Doctrine/Eloquent mismatch is the deciding factor.

Risk summary: low adoption cost, low feature novelty, high maintenance risk, no community or security response path.

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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
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