w3c/lifecycle-events-bundle
A Symfony bundle that integrates Doctrine entity lifecycle events with Symfony’s event dispatcher, letting you handle prePersist, postPersist, preUpdate, postUpdate, preRemove, and postRemove hooks in dedicated listeners instead of entity callbacks.
Framework mismatch is the headline. w3c/lifecycle-events-bundle is a Symfony bundle, not a Laravel package. It assumes Symfony's Kernel, bundle registration in config/bundles.php, the Symfony DI container, and the Symfony EventDispatcher contract. Laravel ships its own container and an Illuminate\Contracts\Events\Dispatcher that is compatible with neither the bundle bootstrapping model nor Symfony's dispatcher interface. There is no composer require path into a Laravel app that produces a working feature; the realistic options are (a) don't use it, or (b) fork/port the concept.
Architecture fit against what Laravel already gives you. The bundle's value proposition — dispatch usable entity lifecycle events on create, update, and delete so side effects live outside controllers — is native to Eloquent via model events (creating, created, updating, updated, deleting, deleted) and Observers, with first-class queue support for listeners. For a Laravel-only estate the net incremental capability is close to zero. The TPM framing should be "we are not buying a feature, we are buying a dependency," and the feature is already in the framework.
Technical risk.
opportunity: 13.38 score here reads as a scarcity signal (few packages in this niche), not as validated demand — do not present it to stakeholders as traction.Key questions for the maintainers / our own review.
Stack fit: do not integrate. The recommendation to engineering is to treat this package as a reference design, not a dependency. A Laravel team that wants its semantics can reproduce them in roughly 200–400 lines: a LifecycleEvent base class, a HasLifecycleEvents trait that hooks bootHasLifecycleEvents(), and observers or a single ModelEventSubscriber wired through EventServiceProvider. That port carries no license ambiguity, no bundle-bootstrapping mismatch, and no foreign DI container, and it inherits Eloquent's existing queue integration and testing helpers.
Migration path if a Symfony service already uses it. Leave it where it is. Do not attempt to unify by pulling the Symfony bundle into Laravel. If an audit trail or downstream consumer must see lifecycle changes from both stacks, standardize on an event contract rather than a library: define a versioned message (e.g., entity.lifecycle.v1 with entity_type, entity_id, change_type, occurred_at, actor_id, payload) and have both sides publish to a queue. Each stack then implements the producer natively — Eloquent observers on Laravel, the bundle (or a fork) on Symfony.
Compatibility notes. Laravel constrains symfony/* components to its own supported major (currently the 7.x line). The event-dispatcher component may co-exist, but bundle registration — the piece that actually wires listeners into a container — has no Laravel analogue. Expect any attempted bridge to require manual compiler-pass emulation, which is unreviewable long-term.
Sequencing.
Maintenance. Once adopted, this package is effectively self-maintained. With zero dependents and a small star count there is no upgrade cohort absorbing breaking changes first, so every Symfony/PHP bump becomes our investigation. Either vendor a pinned copy with a documented patch process, or own the fork — both are more expensive than the ~400-line native port over a 12-month horizon.
Support. No community footprint, no Stack Overflow corpus, no LTS commitment, no published security policy. Escalation is "open an issue on a W3C repo." Any on-call engineer paged for a lifecycle bug at 2 a.m. will have no external runbook to consult; the runbook is whatever we write.
Scaling. The dispatch mechanism itself is cheap. The scaling cost is listener fan-out: synchronous listeners on a write path add latency linearly with subscriber count and turn a single insert into a transaction that touches email, search indexing, and webhooks. If this pattern is ported to Laravel, every listener must implement ShouldQueue and be pushed behind a transactional outbox, otherwise a third-party outage becomes a write outage.
Failure modes to design against (all of which apply equally to a native port).
Model::query()->update() on tracked entities, or route bulk work through chunked iteration.composer update.Ramp-up. For a Symfony-fluent engineer, half a day to read the bundle and understand its dispatch points. For a Laravel-only team, the ramp-up is not the bundle — it's the Symfony bundle/DI/compiler-pass model they have never had a reason to learn, and that knowledge is not transferable to anything else they will do. That asymmetry is the clearest argument for the native-port route.
TPM bottom line. Do not add this to the Laravel dependency graph. Record it in the build-vs-buy log as a reference implementation, close the license question in writing, and budget the 3–5 day spike for a native equivalent if the lifecycle-events requirement survives the step-1 gap analysis.
How can I help you explore Laravel packages today?