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
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-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);