Open
Description
A strong message schema wasn't the first priority when building this playground project. Contexts currently communicate using JSON messages. They don't validate the incoming messages against a schema, nor do they use code generation tools or manually typed types for strong typing and the autocomplete feature of IDEs. There're multitude of options like Protobuf and JSON Schema that work cross platform. Manually typed types are working only if there's only one language, because of the overhead of transporting them to another. Although everything is currently written in PHP, platform independence is a requirement, as future features may be written in a different language.
- Chat context
Use strong message schema in chat #207 - Identity context
Use strong message schema in identity #208 - ConnectFour context -> domain events and their properties should be renamed beforehand (e.g. PlayerResigned instead of GameResigned, PlayerLost and PlayerWon instead of GameWon, PlayerAborted instead of GameAborted, PlayersDrew or PlayersDrawn instead of GameDrawn) otherwise it would need to be touched again.