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.
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.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.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.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).
Adopt when all of the following hold:
Look elsewhere, or build small, when:
SoftDeletes/timestamps plus Spatie's packages. Forcing Doctrine into a Laravel codebase to use this package is a bad trade.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.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.
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.
How can I help you explore Laravel packages today?