This aim to remove Broadway\Serializer\Serializable interface from domain events and allow different outputs from queries.
Because we delegate serialization to a specific service ((de)normalizers), we need to add types mapping for Doctrine to ensure fetched data is of required type (App\Domain\User\ValueObject\Email and App\Domain\User\ValueObject\Auth\HashedPassword). It's part of https://github.com/jorge07/symfony-5-es-cqrs-boilerplate/pull/78
To avoid mismatch between data from Doctrine and instance values, I've added typed properties on some ValueObjects
Note: this is more like a study case for me, and I would like to have your feedback from this approach. I'm totally OK if you don't want to merge this PR :)
This aim to remove Broadway\Serializer\Serializable interface from domain events and allow different outputs from queries.
Because we delegate serialization to a specific service ((de)normalizers), we need to add types mapping for Doctrine to ensure fetched data is of required type (
App\Domain\User\ValueObject\Email
andApp\Domain\User\ValueObject\Auth\HashedPassword
). It's part of https://github.com/jorge07/symfony-5-es-cqrs-boilerplate/pull/78 To avoid mismatch between data from Doctrine and instance values, I've added typed properties on some ValueObjectsNote: this is more like a study case for me, and I would like to have your feedback from this approach. I'm totally OK if you don't want to merge this PR :)