[HttpKernel] PostValueResolver#47146
[HttpKernel] PostValueResolver#47146jack-worman wants to merge 1 commit intosymfony:6.2from jack-worman:PostValueResolver
Conversation
|
Thank for the PR. We rejected this in the past (in the FrameworkExtraBundle) as I don't think this is something we need/want. When dealing with POST requests, most of the time, using some validation is needed. |
|
Fair enough, but what about a QueryParamResolver? The code basically looks the same, just need to do a couple switches. |
It has been rejected as well in #19655. As both indeed require some strong validation against the input value, solving this in a generic way would open the door to security issues. So this is better addressed in userland on a per-parameter basis i.e. by writing your own argument value resolver with appropriate checks for every single expected param. |
|
Closing as explained, thanks for proposing. |
Allows controller routes to have $_POST offsets autowired.
This implementation can be made more abstract to work with all ParameterBag's.