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

unifik/doctrine-behaviors-bundle

A Symfony bundle that adds reusable Doctrine behavior traits such as timestampable, blameable, sluggable, and soft-deletable to your entities, reducing boilerplate and keeping entity mappings clean and consistent across projects.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — low. This is a Symfony2 bundle, not a Laravel package. Its public surface is Symfony-specific: a Bundle class, a DI extension, YAML/XML service definitions, and Doctrine ORM event subscribers registered through the container. Laravel applications run Eloquent as the default ORM and resolve integration through service providers, not bundles. Nothing in this package's composition root is reusable in a Laravel app; only the trait bodies (timestampable, blameable, sluggable, soft-deleteable, translatable, loggable) represent transferable value, and those semantics are already commodity in the Laravel ecosystem.

Integration feasibility — poor as-is, moderate as a spec source. Adopting it verbatim would require running Doctrine ORM inside Laravel (laravel-doctrine/orm or equivalent) and shimming Symfony's bundle/container lifecycle — a bespoke bridge with no upstream support. The realistic path is to treat this repository as a reference implementation of behavior semantics and rebuild them natively. Note that its upstream lineage (knplabs/doctrine-behaviors, gedmo/doctrine-extensions) is far better maintained if the team genuinely commits to Doctrine.

Technical risk — high.

  • Lifecycle: Symfony2 reached end-of-life in 2018; PHP constraint sets from that era collide with PHP 8.x and Doctrine 3.x.
  • Bus factor: single maintainer, 11 stars, 0 dependents. Zero dependents is the most telling metric — no downstream project is absorbing upgrade pressure, so no one is patching this.
  • Licensing: NOASSERTION means GitHub could not map the license file to a known SPDX identifier. That is a procurement and legal blocker until provenance is confirmed; do not vendor code into a commercial product before clearing it.
  • Security posture: no disclosure policy, no advisory history, no release cadence to audit.

Key questions for the team:

  1. Are we standardizing on Eloquent or Doctrine? Almost every downstream decision forks on this answer.
  2. Which behaviors are actually load-bearing — audit trail (loggable/blameable), i18n (translatable), or just timestamps and soft deletes?
  3. Is there a compliance driver (immutable audit log, GDPR deletion semantics) that dictates implementation rigor rather than convenience?
  4. Who owns the fork if we vendor the traits, and what is the review cadence?

Assessment: the opportunity score of 2.08 is consistent with what the repository metadata shows. This is not a dependency to adopt; it is a checklist of behaviors to reimplement.

Integration Approach

Stack fit — mismatch by default. In a Laravel codebase the behavior set maps cleanly onto mature, maintained equivalents:

Behavior Laravel-native option
Timestampable Eloquent $timestamps (built in)
Soft deletes SoftDeletes trait (built in)
Sluggable cviebrock/eloquent-sluggable
Blameable observer writing auth()->id() on creating/updating
Translatable spatie/laravel-translatable or JSON/companion-table design
Loggable / audit owen-it/laravel-auditing or spatie/laravel-activitylog

Every row is actively maintained, PHP 8 compatible, and covered by framework-level documentation. That is the integration path.

Migration path. There is no data migration implied, because we are not importing this package — we are importing its requirements. The work is a behavior specification exercise: enumerate desired behaviors, define column contracts and event ordering, then implement against the table above.

Compatibility. If Doctrine is non-negotiable (e.g., an existing domain model being ported), the viable route is doctrine/orm in Laravel plus knplabs/doctrine-behaviors; port the trait logic only where a behavior is genuinely missing upstream. Do not attempt to load the Symfony bundle class. Expect to rewrite service wiring as a Laravel service provider regardless of path.

Sequencing.

  1. Week 0 — decision gate. Confirm ORM strategy and confirm license provenance (read the LICENSE file; assume restricted until proven otherwise).
  2. Week 1 — behavior spec. Write the matrix above as acceptance criteria, including failure semantics (what happens on soft-deleted records in joins, translatable fallback locale, audit retention).
  3. Week 2 — prototype. Implement the two highest-value behaviors in a throwaway branch against the chosen packages; validate query shape and write amplification.
  4. Week 3 — decide. Green-light full implementation, or escalate if the spec reveals a Doctrine-only requirement.

Total integration effort on the Laravel-native path is measured in days, not weeks. The Doctrine path is a multi-week bridge with a long tail.

Operational Impact

Maintenance. Effectively unmaintained. With zero dependents, there is no community to surface breakage or contribute patches; any adoption means the adopting team is the maintainer. On the recommended path (Laravel-native packages), maintenance burden reverts to normal dependency hygiene — Composer updates, occasional major-version bumps.

Support. No vendor, no SLA, no paid tier, GitHub issues only. Internal escalation path must be defined before any code lands. This is a hard blocker for regulated environments where supply-chain provenance is audited.

Scaling. Behavior implementations are event-listener driven, and two of them scale poorly if implemented naively:

  • Loggable/audit writes an amplification row per mutation. At high write volume this doubles or triples table growth; plan partitioning or an append-only store with a retention policy from day one.
  • Translatable typically adds a join or JSON extraction per read. Index the locale/lookup columns explicitly rather than relying on generated SQL.
  • Blameable requires request-scoped identity; it must degrade gracefully in queue workers, console commands, and seeders where no authenticated user exists.

Failure modes to design against.

  • Soft-delete leakage — records silently disappearing from or appearing in aggregate queries, especially in reporting endpoints and unique-constraint checks.
  • Event ordering collisions — slugs generated before validation, audit rows written before the transaction commits, or blameable resolving a stale user context in long-running workers.
  • Translatable fallback ambiguity — missing-locale behavior differing between read paths.
  • Schema drift — auto-mapping and annotation-driven columns diverging from migrations, producing environments that disagree on structure.
  • Trait collisions — if both a vendored trait and a native trait define the same timestamps or soft-delete hooks, behavior becomes ordering-dependent and non-obvious to debug.

Ramp-up. The real cost is knowledge, not code. Anyone maintaining a Symfony-bundle-derived integration needs Symfony DI and Doctrine event-system fluency — a skill set unlikely to be present or worth cultivating in a Laravel team. The Laravel-native path requires no new competencies: observers, traits, and Eloquent scopes are baseline Laravel. Recommend the native path on ramp-up grounds alone, and treat this repository as documentation of a feature list rather than a dependency.

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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource