gpslab/domain-event-bundle
Symfony bundle that integrates gpslab/domain-event with the framework, making it easy to publish and handle domain events through Symfony services and configuration. Lightweight setup for decoupled domain events in Symfony applications.
Architecture fit
Unchanged. The package is a Symfony bundle, not a Laravel package. It ships a Bundle subclass, a DI extension, and compiler passes wired to Symfony's kernel and EventDispatcher. Laravel has no equivalent extension point, so the packaging layer remains dead weight in our stack and the useful parts would have to be re-hosted. The underlying pattern — record domain events on aggregate roots, collect them, release them after the transaction commits — is framework-agnostic and genuinely valuable. It is the bundle glue, not the concept, that misfits. v2.3.1 does nothing to alter this: no Laravel service provider, no auto-discovery, no dispatcher bridge.
Integration feasibility
Feasible but non-trivial, and still mostly a rewrite rather than an install. A Laravel integration requires a custom ServiceProvider, re-implementation of the compiler-pass logic (tagging and collecting subscribers) using Laravel's container tagging or explicit registration, and an adapter that forwards released events into Laravel's dispatcher or queue. The piece actually worth evaluating remains the framework-agnostic core (gpslab/domain-event); the bundle would largely be replaced by ~150 lines of our own code. The 2.3.1 fix (Doctrine ORM >= 2.7 compatibility) is irrelevant to us — we would drive the core from Eloquent models, not Doctrine entities.
Technical risk
High, marginally reduced at the margins.
--ignore-platform-reqs or a fork.Key questions
DB::afterCommit plus Laravel events?Stack fit
Poor as delivered, unchanged by a patch release. A Laravel-native approach — an aggregate trait that buffers events plus DB::afterCommit plus Laravel's dispatcher — covers the same ground with zero third-party risk. Adopt this package only if the spike demonstrates a concrete capability we would otherwise spend more than a sprint building.
Migration path
Treat the package as a design reference first, dependency second. Run a timeboxed spike installing the core library in a scratch Laravel app, then port the bundle's compiler-pass behavior into a ServiceProvider that tags subscribers and wires them to Event::listen. If we proceed, vendor a pinned fork under our own namespace so we control PHP/Laravel compatibility and can patch without waiting on upstream. Pin to a specific 2.3.x tag rather than a branch — the release line is now moving, so an unpinned constraint is a live risk where it previously was not.
Compatibility
Inspect composer.json platform requirements before anything else; still expect Symfony 4/5 and PHP 7.x constraints. Assume a fork and a patched release are required. No auto-discovery; registration will be manual. 2.3.1's Doctrine fix suggests upstream is maintaining its Symfony-side integration rather than modernising its platform floor — the two are not the same thing, and we should not read the former as progress on the latter.
Sequencing
DomainEventDispatcher interface so the implementation is swappable.Maintenance
Still effectively self-maintained, but no longer in an abandoned-repository sense. Upstream is responsive enough to merge community-reported bugs and to maintain CI. That materially improves one thing: fork patches now have a plausible path upstream, and the added CI gives us a test harness to inherit. It does not reduce our compatibility-patching burden. Budget two to four engineer-days per quarter for compatibility patches around PHP and Laravel upgrades, plus unplanned work if a transitive Symfony or Doctrine dependency breaks. Fork ownership must still be assigned to a named team, not left implicit. Do not treat 2.3.1 as evidence of a support commitment — it is a maintenance release, not a roadmap.
Support
Negligible community support. Fourteen stars means no Stack Overflow corpus, no tutorials, no third-party write-ups. Onboarding still depends on reading source directly, and knowledge concentrates in whoever ran the spike — a real bus-factor risk. The new CI shortens the distance to a working local build, which helps slightly, but it is not documentation.
Scaling
Default behavior is synchronous in-process dispatch. Scaling to queues or multiple consumers requires our own adapter, and the commit-ordering guarantee must be enforced explicitly. At higher event volumes, buffering events on aggregates increases memory pressure per request; long-running workers need explicit flush boundaries. No change here.
Failure modes
Ramp-up
Conceptual ramp-up is low — domain events are well understood by most mid-level engineers. Practical ramp-up is high because there is still no documented Laravel path: expect one to two weeks for a mid-level engineer to reach productive use, including the adapter and the test harness. The new CI removes perhaps a day of build-environment archaeology; the integration work is unchanged.
Recommendation
Do not adopt the bundle. The v2.3.1 release changes our risk narrative but not our decision: it is a Doctrine compatibility fix plus CI housekeeping on the Symfony side, with no Laravel surface and no platform modernisation. Correct the record — the project is maintained, not abandoned — and timebox a one-week evaluation of the core library, defaulting to a thin in-house implementation behind an internal interface. The pattern is worth borrowing; the package is still not worth depending on.
How can I help you explore Laravel packages today?