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

Eventsauce Bundle Laravel Package

jphooiveld/eventsauce-bundle

A Symfony bundle that integrates EventSauce event sourcing into your application, providing service configuration for aggregates, repositories, message dispatching, and event storage so you can build domain-driven, event-sourced systems with less boilerplate.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. jphooiveld/eventsauce-bundle is a thin Symfony bundle that wires the EventSauce event-sourcing library (aggregate root repository, message dispatcher, message/snapshot repositories, serializers) into the Symfony DI container. It is not a Laravel package and cannot be installed as one — Laravel has no bundle manifest, no Kernel::registerBundles(), and no services.yaml autoloading convention that this package depends on. Adopting it in a Laravel codebase means either (a) treating it strictly as reference source for container wiring, or (b) using the underlying eventsauce/eventsauce library directly and hand-writing a ServiceProvider. The architecture itself is a strong, near-irreversible commitment: event sourcing makes the event log a permanent public contract, and every downstream read model becomes a rebuildable projection rather than a source of truth.

Integration feasibility. Low as-is, moderate as a blueprint. Concrete blockers:

  • Framework mismatch — Symfony bundle ≠ Laravel package; zero of the DI wiring is reusable without translation.
  • Staleness — last release 2019-11-25. That predates EventSauce 1.0 (released 2021), which introduced breaking changes to the message dispatcher, repository, and serializer interfaces. Expect the bundle to pin an eventsauce/* version in the 0.x range.
  • Platform skew — a 2019 Symfony bundle targets PHP 7.2–7.4 and Symfony 4.3/4.4. Laravel 9/10/11 require PHP 8.1/8.2+, so the dependency graph will not resolve.
  • No production signal — 15 stars, 0 dependents on Packagist. There is no observed production usage to borrow confidence from.

Technical risk. High, concentrated in four areas:

  1. Abandonment — single maintainer, no release in ~6 years, no security-response posture. You inherit the whole maintenance surface.
  2. Event schema durability — the highest-blast-radius artifact in the system. A 2019-era serializer/upcaster implementation may not match current EventSauce upcasting ergonomics, forcing hand-rolled migration logic later.
  3. Version lock — the bundle constrains EventSauce core, which in turn constrains what you can adopt from the library's own improvements (e.g., improved snapshotting, message ordering guarantees).
  4. Dual-write correctness — event store writes plus async projection dispatch is the classic failure mode; the bundle's dispatcher wiring is the thing you'd most want to inspect and least want to trust unexamined.

Key questions for the maintainer/vendor before committing:

  • Which exact eventsauce/eventsauce and Symfony versions are pinned in composer.json, and does the DI wiring survive a bump to EventSauce 1.x?
  • Does the bundle ship a message repository implementation (Doctrine DBAL?) or only interfaces — i.e., how much persistence code do we still own?
  • Is upcasting supported, and how are event schema versions tracked?
  • Is snapshotting wired, and is there a rebuild command for projections?
  • How is the dispatcher bound — synchronous or via Symfony Messenger — and what is the retry/at-least-once story?
  • Is there any test harness (EventSauce\EventSourcing\TestUtilities) integration for aggregate unit tests?

Verdict: viable as an architectural reference, not as a dependency. Evaluate the underlying library, not the bundle.

Integration Approach

Stack fit. Poor for the stated target (Laravel). The bundle's value is its container configuration — a map of which interfaces bind to which implementations. That map is portable as knowledge, not as code. Reimplementing it as a Laravel ServiceProvider is a bounded, one-to-two-week task for an engineer already comfortable with EventSauce's interfaces.

Recommended path (in order of preference):

  1. Use eventsauce/eventsauce directly + a first-party Laravel provider. Bind MessageRepository, AggregateRootRepository, MessageDispatcher, and the serializer in a ServiceProvider. Use EventSauce\EventSourcing\Serialization\ConstructingMessageSerializer (or Symfony Serializer-backed) and a Doctrine DBAL or Eloquent-backed message repository. This is the only path that gets you a maintained core.
  2. Fork the bundle into a Laravel package. Only defensible if the bundle contains non-trivial persistence or upcasting code worth preserving. Audit src/ first — expect it to be a few hundred lines of DI config, in which case option 1 dominates.
  3. Install the bundle as-is. Not viable without pinning PHP 7.4 and Symfony 4.4, which forfeits Laravel 9+ and current PHP security support. Reject.

Migration/compatibility notes. Whichever path, expect to write or adapt:

  • A message repository against your existing database (new tables: domain_messages, snapshots, aggregate_versions). Schema and indexing are yours to design.
  • An upcaster chain from day one, even with zero upcasters. Retrofitting upcasting after events exist is materially harder.
  • A projection runner — queued job or console command — with idempotent handlers and a replay command.
  • Aggregate version conflict handling (optimistic concurrency on aggregate version); this is where most first integrations fail under load.

Sequencing.

  1. Spike (1 week): read the bundle's src/ and README, extract the wiring map, confirm EventSauce core's current interfaces, prototype one aggregate + one projection in a scratch Laravel app.
  2. Platform (1–2 weeks): service provider, message repository, migrations, upcaster chain, test harness for aggregates.
  3. First bounded context (2–3 weeks): one non-critical aggregate end-to-end, including replay and idempotency tests.
  4. Expand: only after replay has been exercised against real data at least once.

Do not start with a domain where event history is regulatory or financially material.

Operational Impact

Maintenance. Effectively zero upstream. The bundle has had no release since November 2019 and 0 dependents; assume the maintainer is inactive and plan for a hard fork on day one. Budget for: EventSauce core upgrades (which you will want, since the library is actively maintained and the bundle's pin will hold you back), PHP/Laravel major-version bumps, and serializer compatibility. Treat the original bundle as unmaintained reference code, not a dependency you track.

Support. None. No vendor, no SLA, no CVE process, 15 stars means a near-zero community for triage. Internal ownership must be explicit and named — an event store with no owner is an outage waiting on a schema question.

Scaling. Three distinct curves:

  • Event store growth — append-only, unbounded. Plan snapshotting thresholds early (e.g., snapshot every N events per aggregate) or aggregate rehydration latency degrades linearly with history.
  • Projection lag — async read models mean eventual consistency. Instrument lag as a first-class SLI; define the acceptable staleness per read model.
  • Replay cost — full rebuilds are O(total events). At a few million events a rebuild is a maintenance-window operation; at tens of millions it needs chunked/parallel replay or a blue-green read model swap. Design the projection runner for resumability now.

Failure modes to design against:

  • Dual-write split — event persisted but projection dispatch lost (or vice versa). Mitigate with an outbox or dispatch-after-commit with a reconciler, and reconcile on a schedule.
  • Concurrency conflicts — two commands on the same aggregate; without optimistic concurrency you get lost updates that are unrecoverable once written.
  • Upcaster regression — a bad upcaster silently corrupts replayed history. Requires golden-file tests over historical event fixtures.
  • Serializer drift — changing serialization format orphans existing events. Version the format; never mutate a shipped serializer in place.
  • Replay storm — a rebuild saturates the primary DB; isolate read-model writes or throttle the runner.

Ramp-up. Event sourcing is a genuine skill step-change for a team raised on CRUD/ActiveRecord. Realistic estimate: 4–8 weeks before a team is independently productive, and the first bounded context should be considered a learning investment rather than a delivery. Pair the ramp-up with an explicit "what we will not event-source" list — mixed CRUD/ES systems are normal and healthy, and the fastest way to fail is to apply ES to a lookup table.

Recommendation. Do not adopt this bundle as a dependency. Use it as a wiring reference, adopt EventSauce core directly under a first-party Laravel service provider, and gate the whole initiative on a one-week spike plus a named internal owner for the event store.

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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle