feat: add HTTP QUERY method support (v0.0.42)#83
Merged
Conversation
Add first-class handleQUERY() handler to the base Controller (dispatch case + default 405) and ControllerInterface, and include QUERY in RouteGroup's default method set. QUERY is safe and idempotent like GET but carries a request body (IETF draft-ietf-httpbis-safe-method-w-body, OpenAPI 3.2). Add tests/Core/ControllerTest.php covering the default 405 and override paths. Update all docs and AI instruction files enumerating HTTP methods. Bump VERSION 0.0.41 -> 0.0.42 with CHANGELOG entry.
Sync the two manifests missed in the QUERY release commit. Per .claude/commands/release.md the version lives in four places: VERSION, composer.json, package.json, changelog.md. src/Application.php carries no framework version (it reads the consuming app's version.json).
… helpers Code review found the QUERY docs/docblocks referenced $this->body / decodeJsonBody(), which are app-level (skeleton) constructs not present on the framework base Controller. Point to the PSR-7 getRequest()->getBody() instead.
0.0.41 bumped the version (Redis integer round-trip fix, #78) but never added a changelog entry, leaving a gap between 0.0.42 and 0.0.40. Restore the trace.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Adds out-of-the-box support for the HTTP QUERY method (IETF `draft-ietf-httpbis-safe-method-w-body`, OpenAPI 3.2 / Swagger 3.2). QUERY is safe + idempotent like GET but carries a request body — for queries too large/structured for a URL.
Previously QUERY fell through to the generic `handleCUSTOM()`. This promotes it to a named, documented, discoverable verb.
Changes
No changes to FastRoute wiring or request parsing — methods pass through unvalidated; body is already on the PSR-7 request, read via `$this->body` / `decodeJsonBody()`.
Test plan