Weave Code
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

Event Sourcing Laravel Package

prooph/event-sourcing

Lightweight PHP event sourcing library with out-of-the-box integration for prooph/event-store. Provides an AggregateRoot base and AggregateTranslator, plus UUID generation and assertions support. Note: project was supported until Dec 31, 2019 and is deprecated.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Event-Driven Architecture (EDA) Adoption: Enables teams to transition from CRUD-based systems to event-sourced models, improving auditability, scalability, and real-time capabilities.
  • Domain-Driven Design (DDD) Alignment: Supports rich domain modeling by encapsulating business logic within aggregates and events, reducing anemic domain models.
  • Auditability & Compliance: Facilitates immutable event logs for regulatory requirements (e.g., finance, healthcare) without retrofitting.
  • Microservices Roadmap: Provides a foundation for decomposing monoliths into event-driven microservices with bounded contexts.
  • Build vs. Buy: Avoids reinventing event-sourcing infrastructure (e.g., custom event stores, snapshot management) while maintaining flexibility.
  • Use Cases:
    • Financial transaction systems (e.g., ledgers, order processing).
    • Supply chain tracking (e.g., inventory, logistics).
    • User activity streams (e.g., SaaS feature adoption, personalization).

When to Consider This Package

  • Adopt if:

    • Your system requires temporal queries (e.g., "Show me all state changes for this entity over time").
    • You need high consistency with eventual consistency trade-offs (e.g., financial systems).
    • Your team is already familiar with DDD or CQRS patterns.
    • You’re building a greenfield project or refactoring a monolith with clear bounded contexts.
    • You prioritize developer productivity over minimal dependencies (PHP ecosystem support).
  • Look elsewhere if:

    • You need real-time event processing (consider Kafka, Pulsar, or native PHP event libraries like ReactPHP).
    • Your use case is simple CRUD (overkill for basic persistence).
    • You require scalable event streaming (e.g., 100K+ events/sec; consider specialized databases like EventStoreDB).
    • Your team lacks PHP event-sourcing expertise (steep learning curve for aggregates, projections, and snapshotting).
    • You’re constrained by license compatibility (BSD-3 is permissive but verify downstream dependencies).

How to Pitch It (Stakeholders)

For Executives: "This package lets us build systems where every change is recorded as an immutable event—like a blockchain for our business logic. It’s a game-changer for audit trails, real-time updates, and scaling microservices. For example, in [Industry X], companies using event sourcing reduced compliance costs by 40% and enabled features like ‘undo’ transactions in seconds. We’d own the core tech (no vendor lock-in) while focusing on business value."

For Engineering: *"prooph/event-sourcing gives us a battle-tested PHP implementation of event-sourced aggregates with:

  • No boilerplate: Handles versioning, snapshots, and event replay out of the box.
  • PHP-native: Integrates seamlessly with Laravel (via repositories) and other PHP frameworks.
  • Extensible: Plug into any event store (doctrine DBAL, Elasticsearch, etc.) or add custom middleware.
  • Dev-friendly: Clear separation of concerns (aggregates, events, commands) aligns with DDD. Trade-off: We’ll need to upskill on CQRS and projection management, but the long-term flexibility pays off for complex domains like [Specific Feature]."*

For Architects: *"This fills a gap in the PHP ecosystem by providing a mature, dependency-injection-friendly event-sourcing layer. Key advantages:

  • Decoupling: Aggregates emit events decoupled from infrastructure (easy to swap stores later).
  • Resilience: Built-in event replay and snapshot restoration handle failures gracefully.
  • Laravel-ready: Works with Eloquent or custom repositories; minimal setup for existing apps. Recommendation: Pilot with a non-critical module (e.g., user profiles) to validate the pattern before full adoption."*
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.
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony
spatie/flare-daemon-runtime