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.
Package info
github.com/syeedalireza/symfony-eventsourcing-toolkit
Type:symfony-bundle
pkg:composer/syeedalireza/symfony-eventsourcing-toolkit
v1.0.0
2026-01-31 06:00 UTC
Requires
- php: ^8.2
- doctrine/dbal: ^4.0
- ramsey/uuid: ^4.7
- symfony/framework-bundle: ^7.0
- symfony/messenger: ^7.0
Requires (Dev)
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^11.0
This package is not auto-updated.
Last update: 2026-03-04 05:17:21 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);