|
$domainEvent = $this->serializer->deserialize($storedEvent->getEventBody(), $storedEvent->getTypeName(), 'json'); |
Can we add the possibility of storing type as simple strings and map them to real class somewhere else? (Of course the bundle needs to be made aware of all domain events in that case)
Maybe add a static method/property (getName / eventName) method to DomainEvent?
Nice to have but not necessary, helps when events are moved around (say namespace change) and say you want to create a projection from the stored events at some point.
ddd-bundle/src/Infrastructure/Console/PublishDomainEventsCommand.php
Line 79 in d13ad0b
Can we add the possibility of storing type as simple strings and map them to real class somewhere else? (Of course the bundle needs to be made aware of all domain events in that case)
Maybe add a static method/property (
getName/eventName) method to DomainEvent?Nice to have but not necessary, helps when events are moved around (say namespace change) and say you want to create a projection from the stored events at some point.