Make EventStore::Event#data a pure Hash
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The following discussion from !169957 (merged) should be addressed:
-
@splattael started a discussion: Observation (non-blocking) I wonder if instead of calling
to_hhere and inconsume_eventabove we should rather ensure thatEvent#dataonly contains a realHash.Currently, it's possible to pass "Hash"-like data for example
ActiveSupport::HashWithIndifferentAccess.ActiveSupport::HashWithIndifferentAccess.new.is_a?(Hash) # => trueEvent#validate_data!could either:- Fail if
datais not a real Hash - OR convert
ActiveSupport::HashWithIndifferentAccessto aHash
This would make the
to_hcalls deep in the subscription code unnecessary.WDYT @fabiopitino?
/cc @bwill because of !145585 (merged)
- Fail if
Edited by 🤖 GitLab Bot 🤖