Skip to content

Can we store string representation of event? #2

Description

@faizanakram99

$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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions