Open
Labels
enhancementNew feature or requestNew feature or requestroutingRouting and route resolutionRouting and route resolution
Milestone
Description
Problem
Quantum\Router\RouteBuilder has route helpers for get(), post(), put() and delete(), but none for patch(). PATCH is a supported method everywhere else: Request::METHODS, HttpClient::METHODS, Csrf::METHODS, and the request body parsing treats it like PUT and POST. A PATCH route can only be written with add($path, 'PATCH', $handler).
Proposal
Add RouteBuilder::patch(string $path, $handler, string $action = null): self in src/Router/RouteBuilder.php, next to put(), written the same way:
return $this->addRoute(['PATCH'], $path, $handler, $action);It only adds a method, so nothing existing changes. Routes declared with add($path, 'PATCH', ...) keep working.
Acceptance
patch()registers a route with thePATCHmethod, with a handler and with a controller action, the same as the other helpers.- A unit test in
tests/Unit/Router/next to the tests ofput()anddelete(). CHANGELOG.mdentry under Added.- Docs: the routing page lists
patch()with the other verb helpers (separate docs ticket).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestroutingRouting and route resolutionRouting and route resolution
Activity