Skip to content

[HttpFoundation][HttpKernel][WebProfilerBundle] Add support for the QUERY HTTP method #61173

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

Open
wants to merge 1 commit into
base: 7.4
Choose a base branch
from

Conversation

alexandre-daubois
Copy link
Member

@alexandre-daubois alexandre-daubois commented Jul 21, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #60521
License MIT

Not much difference from GET, appart that the request body is used to generate the cache key in HttpCache.

Webprofiler integration:

image

@MatTheCat
Copy link
Contributor

Should

&& \in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), ['PUT', 'DELETE', 'PATCH'], true)
be updated to add QUERY to the list?

@alexandre-daubois
Copy link
Member Author

The same question applies to create(). I'm not sure. The RFC says:

Implementations MAY use a request body of any content type with the QUERY method

I guess that if we may, we can fallback on application/x-www-form-urlencoded like other methods

@stof
Copy link
Member

stof commented Jul 21, 2025

We should indeed parse a application/x-www-form-urlencoded body like for other methods.

@alexandre-daubois alexandre-daubois force-pushed the query-method branch 4 times, most recently from 0201731 to f9d9416 Compare July 21, 2025 12:03
@carsonbot carsonbot changed the title [HttpFoundation][HttpKernel] Add support for the QUERY HTTP method [HttpFoundation][HttpKernel][WebProfilerBundle] Add support for the QUERY HTTP method Jul 21, 2025
@alexandre-daubois
Copy link
Member Author

PR updated. A follow-up PR would be to also support the method in HttpClient. I added support for the method also in WebProfilerBundle

@alexandre-daubois alexandre-daubois force-pushed the query-method branch 4 times, most recently from 93c0d2c to 759bdfd Compare July 21, 2025 13:12
@alexandre-daubois
Copy link
Member Author

alexandre-daubois commented Jul 21, 2025

The tests are passing, but failing when reruned here. Not sure why though. Should we remove http-kernel@^6.4 from WebProfilerBundle's composer.json?

Status: Needs Review

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.

Add support for QUERY method
5 participants