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

netbull/doctrine-behaviors

Doctrine behavior extensions for Laravel, adding reusable traits and listeners for common ORM patterns like timestamps, slugs, soft deletes, and blameable fields, so models stay clean and consistent with minimal boilerplate.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for commodity CRUD features. Slugs, timestamps, soft deletes, UUIDs, and nested categories are table stakes in almost every admin-facing product we ship. This package lets engineering treat them as configuration rather than custom code, which is the difference between a 2-day and a 2-week feature.
  • Audit and compliance roadmap items. Blameable (who created/changed a record) and Loggable (change history) are usually scoped as separate "audit trail" epics. If this package lands, those epics collapse into entity annotations, and we can re-quote compliance-driven requests (SOC 2 evidence, customer-facing activity feeds) at a fraction of the estimate.
  • Internationalization sequencing. Translatable means we can commit to multi-language content without a schema redesign. That decision affects whether localization is a Q3 or Q4 commitment — worth resolving before we publish a roadmap externally.
  • Deletion semantics as a product policy. SoftDeletable is not just a technical choice; it determines whether "delete" means recoverable, whether we can offer undo, and how we answer GDPR erasure requests. This package forces us to make that policy explicit early.
  • Scope discipline on internal tooling. Because the behavior set is broad and pre-built, it reduces pressure to build bespoke admin-panel scaffolding. Good lever for saying "no" to one-off internal tools.

Caveat for the decision record: this is a Doctrine ORM package, not an Eloquent one. If the relevant product surface is a standard Laravel app on Eloquent, most of these behaviors already exist in the framework (SoftDeletes, timestamps) or in well-adopted packages (spatie/laravel-sluggable, translatable, tags). The build-vs-buy math only holds for Doctrine-backed services (via laravel-doctrine or a Symfony component).

When to Consider This Package

Adopt when all of the following hold:

  • The service genuinely uses Doctrine ORM, not Eloquent.
  • We need three or more of the behaviors simultaneously — the value compounds; a single behavior isn't worth the dependency.
  • We can pin the version and accept ownership of a vendored fork (see risk below).

Look elsewhere, or build small, when:

  • The stack is Eloquent. Use native SoftDeletes/timestamps plus Spatie's packages. Forcing Doctrine into a Laravel codebase to use this package is a bad trade.
  • You need one behavior only. A 30-line trait or a listener is cheaper than a dependency and a review.
  • Adoption risk matters more than speed. This package shows 0 stars, 0 dependents, and a low maintenance score (~1.8). It is a fork of the long-standing KnpLabs/DoctrineBehaviors, so the code lineage is credible, but the fork itself has no community, no issue triage capacity, and no downstream validation. Treat it as source we adopt, not a vendor we depend on: vendor it into the repo, assign a named maintainer, and plan to patch it ourselves.
  • Compliance-heavy audit requirements. Loggable is a convenience, not a certified audit log. If the requirement is regulatory (immutable, tamper-evident, retention-policied), that is a separate build.

Also verify license compatibility and confirm the release cadence holds — a single recent release with zero dependents is a weak signal, not a strong one.

How to Pitch It (Stakeholders)

To executives: This is a mature, MIT-licensed library of pre-built database behaviors — slugs, timestamps, soft deletes, UUIDs, audit trails, translations, and nested categories. It lets us stop hand-building the same plumbing in every service and redirects that engineering capacity to differentiating work. The trade-off is support risk: it has effectively no external user base, so we would own it internally. That is manageable for a small, well-understood library, and it is the right call if the team is on Doctrine — otherwise the framework already provides most of this for free.

To engineering: Adopt only for Doctrine-based services, pin and vendor the fork, name an owner, and require at least three behaviors in use before adding the dependency. Not recommended as a reason to adopt Doctrine in an Eloquent codebase.

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib