Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpKernel] Nullable and default value arguments in RequestPayloadValueResolver #50747

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

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

mdeboer
Copy link
Contributor

@mdeboer mdeboer commented Jun 22, 2023

Q A
Branch? 6.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #50690
License MIT

This PR adds support to RequestPayloadValueResolver for nullable arguments and arguments with a default value set. See #50690 (comment)

Credits go to @nicolas-grekas for the implentation 👍🏻

@carsonbot carsonbot added this to the 6.3 milestone Jun 22, 2023
@mdeboer mdeboer changed the title Nullable and default value arguments in RequestPayloadValueResolver [HttpKernel] Nullable and default value arguments in RequestPayloadValueResolver Jun 22, 2023
@carsonbot carsonbot changed the title [HttpKernel] Nullable and default value arguments in RequestPayloadValueResolver Nullable and default value arguments in RequestPayloadValueResolver Jun 22, 2023
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks! Here are some CS fixes and GTM!

@mdeboer
Copy link
Contributor Author

mdeboer commented Jun 22, 2023

Wow, just turned off my pc so figured I'd approve these changes on my phone. But apparently it creates a commit for every change, if you want I can squash them tomorrow 😂

Wasn't sure about the formatting. Not too happy with how it looked but thought that'd be something for a different PR.

Got lots of questions like why the serializer context keys are mentioned in the docblock but not used etc. But yeah, for a new PR I suppose 😅

@carsonbot carsonbot changed the title Nullable and default value arguments in RequestPayloadValueResolver [HttpKernel] Nullable and default value arguments in RequestPayloadValueResolver Jun 23, 2023
@nicolas-grekas
Copy link
Member

why the serializer context keys are mentioned in the docblock but not used etc

For BC, that's how we deal with adding new arguments without breaking anything until the next major.

@nicolas-grekas nicolas-grekas force-pushed the mdeboer/req-payload-resolver branch from 21b25b0 to 8d31ed5 Compare June 23, 2023 07:24
@nicolas-grekas
Copy link
Member

Thank you @mdeboer.

@nicolas-grekas nicolas-grekas merged commit d3ba2be into symfony:6.3 Jun 23, 2023
@mdeboer mdeboer deleted the mdeboer/req-payload-resolver branch June 23, 2023 11:03
@fabpot fabpot mentioned this pull request Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants