Skip to content

Feature/http query method - #365

Merged
philipobenito merged 3 commits into
7.xfrom
feature/http-query-method
Jul 14, 2026
Merged

philipobenito merged 3 commits into
7.xfrom
feature/http-query-method

Conversation

@philipobenito

Copy link
Copy Markdown
Member

No description provided.

The merged regression test only asserted getRoutes() ordering and never
exercised the dispatch path, where the fatal BadRouteException was actually
thrown. It also used non-conflicting static paths, so it could not reproduce
the shadowing. Add a match-level test registering a named static route
followed by an unnamed variable route, which fails with BadRouteException on
the pre-fix code and passes on the fix.

Also record the fix under a new Fixed section in the changelog (#362, #363).
QUERY (draft-ietf-httpbis-safe-method-w-body) is a safe, idempotent
method like GET that permits a request body. Expose it as a standalone
verb helper alongside the existing verbs; it delegates through map()
like every other verb, so no dispatcher or allowlist change is needed.
Add the query verb to the Request Verbs sample and a CHANGELOG entry
citing the IETF draft the method originates from.
@philipobenito
philipobenito merged commit 5302c8f into 7.x Jul 14, 2026
10 checks passed
@philipobenito philipobenito mentioned this pull request Jul 14, 2026
@zykogithub

Copy link
Copy Markdown

That was pretty fast, I could have done it by myself😅
Thank for the implementation!
Just I have one more question :

  • Is it possible that some cdn disturb the process by rejecting the query request?
  • Can we already use your implementation or I have to wait until the next release?

Thank you for your answer

@philipobenito

philipobenito commented Jul 14, 2026 •

Copy link
Copy Markdown
Member Author

@zykogithub already released as part of 7.0.0 - https://github.com/thephpleague/route/releases

this is a larger major release though so take a look at https://route.thephpleague.com/7.x/upgrade/ (if you need it in 6.x I'm happy for you to put a PR in for the 6.x branch that recreates it)

as for your cdn question, I'm not sure without testing, it just accepts the method at the router level

@zykogithub

Copy link
Copy Markdown

About cdn, I will try with production environment and we will see
About the merging in 6.0.x, I will tell you which version I use, but I will update if it's necessary because in my project, I don't really take a look at which version I use

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