Skip to content

Conversation

@hafezdivandari
Copy link
Contributor

@hafezdivandari hafezdivandari commented Dec 9, 2024

Related to #53731

A query string parameter key may contain a dot, and manipulating the query string with methods that support "dot" notation makes the current implementation buggy. This PR adds two tests that demonstrate the issue.

This PR:

  • Moves the logic for query string manipulation from the Uri class to the UriQueryString class.
  • Fixes the issue with manipulating query parameters that have dots in their keys.

There’s room for improvement in this PR. Please mark it as a draft if you think the general approach is heading in the right direction. Any feedback is appreciated. Thanks!

@taylorotwell
Copy link
Member

I don't want to move the manipulation stuff into the query parameters class. I want it to stay in the URI class.

The dot notation stuff was intentional, though I'm not 100% confident it is the right approach. It makes it easy to dig into array based query strings... and it makes it consistent with how $request->input works as well as $request->has, $request->missing, etc. since both share the InteractsWithData trait.

@hafezdivandari hafezdivandari deleted the 11.x-enhance-uri-query-string branch December 11, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants