-
Notifications
You must be signed in to change notification settings - Fork 917
Use shorthand nullability typings for better readability #5733
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
base: next
Are you sure you want to change the base?
Use shorthand nullability typings for better readability #5733
Conversation
Hey @jnoordsij thanks for the contribution. 🙏 Would it be too much to ask to merge both PR's into a single one, since they address the same issue ? If you don't have time/will to do it, let me know and I can do that, I'd rather merge this as a single PR 👍 Cheers |
I'm all fine with adding the commit here to #5732. I've deliberately split them, as #5732 now only contains essential changes that are practically identical to the previous state, just solving the deprecations. This MR goes slightly further by actually introducing a single behavior change, and thus should arguably be handled with a little more care. Moreover, the changes are merely cosmetic and are not required to actually fix deprecation messages, like #5732. However, if you prefer handling it all together at once, just let me know and I'll cherry-pick this onto #5732. |
Thanks for the clarification. 🙏 I agree then, let's merge the other PR in v6, and mark this for v7, I agree that it's unlike that anyone is using Thanks @jnoordsij 🙏 |
af9feb4
to
fff82d0
Compare
Sounds great! I've rebased this to resolve conflicts with the new target branch. |
1253d3b
to
7019815
Compare
41584fb
to
a2e2232
Compare
Also remove nullability on registerModelEvents parameter, given that it makes little sense for a boolean value.
fff82d0
to
904b31e
Compare
Rebased onto |
WHY
BEFORE - What was wrong? What was happening before this PR?
When working on #5732, I encountered some other (nullable) types that could be simplified, to improve readability.
AFTER - What is happening after this PR?
Cleaner code.
HOW
How did you achieve that, in technical terms?
Use shorthand.
Is it a breaking change?
No (or not really); only the change in
RegisterUploadEvents::handle
is a change in behavior, due to no longer allowingnull
; however explicitnull
passing seems unlikely and unwanted here.How can we test the before & after?
N/A