syeedalireza/symfony-eventsourcing-toolkit

Enterprise-grade Event Sourcing and CQRS implementation for Symfony. Build scalable, auditable applications with complete event history, temporal queries, and event replay capabilities.

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:symfony-bundle

pkg:composer/syeedalireza/symfony-eventsourcing-toolkit

v1.0.0 2026-01-31 06:00 UTC

This package is not auto-updated.

Last update: 2026-02-04 05:02:54 UTC


README

Event Sourcing and CQRS implementation for Symfony with PostgreSQL event store, projections, and snapshots.

Features

  • PostgreSQL-optimized Event Store
  • CQRS Command/Query separation
  • Event versioning and upcasting
  • Snapshot mechanism for performance
  • Projection engine with rebuild
  • Event replay functionality
  • Symfony Messenger integration

Installation

composer require syeedalireza/symfony-eventsourcing-toolkit

Quick Start

// Define your aggregate
class BankAccount extends AggregateRoot
{
    private Money $balance;

    public function deposit(Money $amount): void
    {
        $this->recordThat(new MoneyDeposited($amount));
    }

    protected function applyMoneyDeposited(MoneyDeposited $event): void
    {
        $this->balance = $this->balance->add($event->amount);
    }
}

// Use the event store
$eventStore->save($account);
$history = $eventStore->load($accountId);