Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[HttpFoundation] InputBag feature seems problematic #37029

Copy link
Copy link
Closed
@gmponos

Description

@gmponos
Issue body actions

Symfony version(s) affected: 5.1.0

Description

Hi this is a followup of this: #34363

  1. http://localhost/myendpoint?test=what&test=what2 -> this is a valid request. So the query option test can exist one or multiple times. Which makes it a string AND an array... Although this is not handled by sf ATM. I have another app written on another lang that I would like to migrate to sf at some point.. was hoping that in the future sf will add support for the feature above but I see it is moving towards to the opposite direction.
  2. Now you are defining the behavior. I mean before the behavior was in the hands of the programmer. If he didn't check that it is an array it was it's own bug therefore a 500 is fine.. now why to throw an exception?

For instance how is someone supposed to handle now this? (which I do have cases like this, yea I know they suck a bit)

http://localhost/myendpoint?username=what
http://localhost/myendpoint?username[]=what&username[]=what2

Let's say we are on sf6... should the developer add a try catch using get and then if an exception is thrown use the all function. It seems a little bit not worth it..

Furthermore what was the motion behind this PR...? Was this something commonly reported that should've been fixed? IMHO it was working fine as it was and the strictness there is not needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.