andreo / eventsauce-aggregate
EventSauce 的扩展聚合组件
3.1
2023-03-27 18:44 UTC
Requires
- php: >=8.2
- eventsauce/eventsauce: ^3.0
Requires (Dev)
- eventsauce/test-utilities: ^3.0.0
- eventsauce/uuid-encoding: ^0.3.0
- phpstan/phpstan: ^1.3
- phpunit/phpunit: ^9.4
- roave/security-advisories: dev-latest
README
EventSauce 的扩展聚合组件
安装
composer require andreo/eventsauce-aggregate
基于属性处理聚合事件
use EventSauce\EventSourcing\AggregateRoot; use Andreo\EventSauce\Aggregate\Reconstruction\EventSourcingHandler; use Andreo\EventSauce\Aggregate\Reconstruction\AggregateRootBehaviourWithAppliesEventsByAttribute; final class FooAggregate implements AggregateRoot { use AggregateRootBehaviourWithAppliesEventsByAttribute; #[EventSourcingHandler] public function onFooInitiated(FooInitiated $event): void { } }