-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
9.0 TASK: remove string union types in filters, to increase type safety #4094
Conversation
From @mficzel :
|
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.
Lets build a property mapper for this job ;) :D
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.
Sweet! Did you check if existing code still uses the string versions?
I had enabled strict mode for all filters and that indeed doesn't allow stringable objects. |
Not against strictness. Just wanted to ensure we do not decide with a not fully correct assumption. I would suggest to use the principle of beeing strict inside the CR but be a little more tolerant on the border to integration country (Eel, flowQuery). Offcourse only where there is no doubt which id is meant. |
I have to correct myself. So $filter->withNodeAggregateId(ContentStreamId::create()); Will indeed not fail if:
The tests currently fail because the old version was still used.
Strict VOs are anyways a huge help to prevent nasty bugs and security issues down the road. We can always relax the rules, but making them more strict won't be easily possible after a release. BTW: I totally agree to @mficzel's comment re
And I would consider a Filter DTO to be on the border |
I discussed this again with @skurfuerst and we agreed to keep support for the literal types in the BTW: With #4133 we plan to remove |
No description provided.