Skip to content

feat: add HTTP QUERY method support (v0.0.42)#83

Merged
ksandell merged 4 commits into
developfrom
feat/http-query-method
Jun 30, 2026
Merged

feat: add HTTP QUERY method support (v0.0.42)#83
ksandell merged 4 commits into
developfrom
feat/http-query-method

Conversation

@ksandell

Copy link
Copy Markdown
Contributor

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

  • Core: `Controller::handle()` dispatch case + `handleQUERY()` default 405; `ControllerInterface::handleQUERY()`; `QUERY` added to `RouteGroup` default method set.
  • Tests: `tests/Core/ControllerTest.php` — default 405 + override paths.
  • Docs: QUERY added to every HTTP-method enumeration (README, doc/, .claude/, .github/).
  • Release: VERSION 0.0.41 → 0.0.42, CHANGELOG entry.

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

  • `./vendor/bin/phpunit tests/Core/ControllerTest.php` — green (2 tests)
  • Full suite green except pre-existing `RedisTest::testIncrement` (live-Redis state leakage, unrelated; fails on clean tree too)
  • Manual: route with `"methods":["QUERY"]` → controller `handleQUERY()` reads body

ksandell added 2 commits June 30, 2026 09:18
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).
ksandell added 2 commits June 30, 2026 09:25
… 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.
@ksandell ksandell merged commit 34b7648 into develop Jun 30, 2026
4 checks passed
@ksandell ksandell deleted the feat/http-query-method branch June 30, 2026 07:39
@ksandell ksandell mentioned this pull request Jun 30, 2026
4 tasks
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.

1 participant