New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TASK: Cleanup EventNormalizer
#5016
Conversation
Add `EventNormalizer::normalize()` and make `getEventData()` and `getEventType()` private
$this->eventNormalizer->getEventType($event)->value, | ||
json_decode($this->eventNormalizer->getEventData($event)->value, true), | ||
[] | ||
$normalizedEvent->id->value, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess this is a functional change as in that we now have stable ids in the export.
Probably a good idea so we have less diff if exporting twice and having the export in version control like the Neos.Demo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the same as before (I think). The normalizer will create the id (unless its a decorated event that already has one)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah i see you're right a bit sneaky i see ^^ (We are sure at that time that its not a decorated event ... thats why it works)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay in that case i guess its a bit weird that normalise
is not pure and will return different results on succeeding calls. But the behaviour is not new and required already at other places (we just seem to share the code here now)
So 👍 feel free to merge this ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if it was and even if it would specify the id it would work as long as the id is unique
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but id like to mark this as a TASK
as the release notes for the next beta would otherwise confusing. What is here to gain for the end user. Its a nice refactoring for us imo.
EventNormalizer
EventNormalizer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! 👍
$this->eventNormalizer->getEventType($event)->value, | ||
json_decode($this->eventNormalizer->getEventData($event)->value, true), | ||
[] | ||
$normalizedEvent->id->value, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
EventNormalizer::normalize()
and makegetEventData()
andgetEventType()
private