ddd icon indicating copy to clipboard operation
ddd copied to clipboard

Event's occurredOn attributes types should be immutable

Open bystro opened this issue 6 years ago • 0 comments

First of all I want to thank you boys for your job. I bought your e-book and find it useful.

Event's occurredOn attributes types should be immutable, but StoredEvent's occurredOn is mutable because of DateTime type. https://github.com/dddinphp/ddd/blob/master/src/Domain/Event/StoredEvent.php#L34

Especially last-wishes app fires Event with DateTimeImmutable type - inconsistency that throws Exception. https://github.com/bystro/last-wishes/blob/master/src/Lw/Domain/Model/User/UserRegistered.php#L19

Boys are you open for a PR? I can make some job.

bystro avatar Jun 14 '19 08:06 bystro