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 Bundle Laravel Package

ruwork/doctrine-behaviors-bundle

Symfony bundle for integrating Doctrine behavioral extensions, simplifying configuration of behaviors such as timestampable, blameable, sluggable, tree, and soft-deletable entities in your projects.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package is mislabeled in the request: it is not a Laravel package. It is a Symfony bundle (ruwork/doctrine-behaviors-bundle) that wires the ruwork/doctrine-behaviors library into the Symfony DI container by registering Doctrine event subscribers for behaviors such as timestampable, blameable, soft-delete, and sluggable. It presumes Symfony's bundle/kernel architecture, service tagging, and configuration tree. A Laravel application runs on Eloquent by default; adopting this would require first adopting Doctrine ORM plus a Doctrine integration layer for Laravel, then hand-wiring the subscribers this bundle was built to register for you. The bundle's core value proposition — automatic service registration — evaporates outside Symfony.

Integration feasibility. Low for a Laravel codebase, moderate for a Symfony 3.x/4.x codebase frozen on the matching PHP generation. The underlying behaviors themselves are small, well-understood Doctrine event-listener patterns; the reusable intellectual property is perhaps a few hundred lines of listener logic. Any competent engineer can reimplement the specific behavior required (e.g., soft-delete via a query filter plus a deletedAt column) in less time than it takes to validate this dependency. That reframes the decision: we are not evaluating an integration, we are evaluating whether to harvest code from an abandoned repository.

Technical risk. High and asymmetric:

  • Archived, last release June 2018. No compatibility work for PHP 8.x, Doctrine ORM 2.10+/3.x, Symfony 5/6/7, or the annotation-to-attributes migration. Doctrine ORM 3 removed several APIs this generation of listener code relies on.
  • Zero stars, zero dependents, zero external usage. No signal of production hardening, no issue history to mine for known failure modes, no community to share the maintenance burden.
  • MIT license is the one clean dimension: forking and vendoring is legally unencumbered.
  • Supply-chain surface is minimal but non-zero: an unmaintained transitive dependency in the ORM layer is exactly the class of package that accumulates silent CVEs and blocks framework upgrades.
  • The automated score of 0 with a non-trivial "opportunity" sub-score is best read as "there is a real problem here, but nothing here solves it" — the need for declarative Doctrine behaviors is legitimate; this artifact is not the answer.

Key questions.

  1. Is the target application actually Laravel/Eloquent, or Symfony/Doctrine? The answer likely ends the evaluation.
  2. Which specific behavior do we need — soft-delete, audit timestamps, blameable, sluggable — and does the framework already provide it natively (Eloquent soft deletes, model observers, created_at/updated_at, route-model-binding slugs)?
  3. If Doctrine is mandatory, has gedmo/doctrine-extensions + stof/doctrine-extensions-bundle been ruled out? That is the maintained, widely adopted equivalent with the dependents and release cadence this package lacks.
  4. Who owns the fork, and what is the exit plan when PHP/Doctrine compatibility breaks?
  5. Are there audit, compliance, or data-retention requirements that make soft-delete semantics correctness-critical? If so, unmaintained listener code is the wrong foundation.

Integration Approach

Stack fit. Poor. For a Laravel/Eloquent application, integration cost is dominated by introducing Doctrine at all — a migration far larger than the feature being requested. For a Symfony/Doctrine application, fit is structural but version-constrained; verify the bundle's composer.json constraints against the current PHP and Symfony versions before anything else. Expect the constraints to exclude current runtimes entirely.

Recommended path (Laravel). Do not integrate. Implement the behavior natively:

  • Soft deletes → built-in SoftDeletes trait, withTrashed/onlyTrashed scopes.
  • Audit timestamps → $table->timestamps(), already default.
  • Blameable → model observers or a small trait writing created_by/updated_by from the authenticated context.
  • Sluggable → a HasSlug trait or spatie/laravel-sluggable. This delivers the same semantics with zero new dependencies, first-class framework support, and no upgrade debt.

Recommended path (Symfony/Doctrine). Adopt gedmo/doctrine-extensions with stof/doctrine-extensions-bundle instead. It covers the same behavior set, has an active maintainer base, and ships compatibility for current Doctrine releases. Migrating behavior annotations/attributes at this layer is a per-entity, mechanical change.

Fallback path (hard requirement on this specific library). Treat it as source code, not a dependency: fork to an internal namespace, vendor it, strip the Symfony bundle layer, replace the service wiring with explicit listener registration, add test coverage for each behavior, and pin the PHP/Doctrine versions it runs against. Budget this as a small internal project with a named owner, not as a Composer install.

Sequencing. (1) Confirm runtime and ORM. (2) Confirm the precise behavior list. (3) Prototype the native/maintained alternative against one representative entity. (4) Only if the prototype fails a hard requirement, evaluate the fork. Never sequence the fork first — it front-loads risk for a feature that is usually a 50-line trait.

Operational Impact

Maintenance. Effectively total internal ownership on day one. Archived projects receive no bug fixes, no security patches, and no compatibility updates. Every future PHP minor, Symfony major, and Doctrine major becomes our remediation work. The bus factor is one: whoever forks it.

Support. None upstream. No maintainer to escalate to, no issue tracker with resolution history, no community forum. Internal support is limited to engineers who can read Doctrine's event system — a narrower group than those who can write an Eloquent trait.

Scaling. Runtime cost is negligible either way: Doctrine listeners fire per entity per flush, and soft-delete query filters add a predicate to reads. The real scaling constraint is organizational — the maintenance cost grows with every framework upgrade cycle, while the benefit stays fixed. Over a three-year horizon this dependency's total cost of ownership is far higher than any equivalent built into the framework.

Failure modes.

  • Upgrade wall: a PHP or Doctrine bump produces fatal errors deep in listener internals with no upstream fix; the only path is an emergency internal patch.
  • Silent data exposure: soft-delete implemented via query filter is easy to bypass with native SQL, DQL DELETE, or raw queries — deleted records resurface in reports or API responses. This is a correctness and potentially compliance risk.
  • Blameable context gaps: listeners that resolve the current user from a security token fail or write null in CLI, queue workers, and console commands; queued jobs that write audit fields silently lose attribution.
  • Metadata/cache breakage: annotation-driven behavior metadata interacts badly with production metadata caching after deploys, producing behavior that works locally and not in prod.
  • No CVE response: any future advisory against the dependency has no upstream patch; we are the patch.

Ramp-up. Low conceptual learning curve — these are simple, well-documented behavioral patterns, and engineers familiar with Doctrine or with Eloquent observers will grasp the intent in an hour. The cost is archaeological rather than intellectual: reading 2018-era code, understanding legacy annotation semantics, and tracing DI wiring with no documentation. For a Laravel team, add the cost of learning Doctrine's unit-of-work, event lifecycle, and metadata model — a multi-week learning curve for a feature the framework ships out of the box.

Bottom line. MIT licensing aside, this package offers no viable adoption path. The underlying need is real; this artifact is not the implementation. Recommend closing the evaluation and routing to the native framework feature (Laravel) or gedmo/doctrine-extensions (Doctrine), reserving a fork only for a documented hard requirement with a named owner and a funded exit plan.

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