Repository navigation
v0.3.3
Two additions and a catalogue update, the additions found by building Pingback, an API on api-toolbox whose SDK is tested against it. Everything already in 0.3.2 behaves as it did, apart from five statuses that now get a type (below).
composer require juststeveking/api-toolbox:^0.3.3Deprecating a query form of a route
A URI's query is part of what identifies the resource (RFC 3986 section 3), so /contacts?organization_id=X is a resource of its own, and RFC 9745 lets it be deprecated while /contacts is not. #[Deprecation] and #[Sunset] take query: and apply only to requests that carry that parameter:
#[Deprecation(at: '2026-10-29T00:00:00Z', link: 'https://docs.example.com/deprecations/contact-filter', query: 'organization_id')]
#[Sunset(at: '2027-01-31T23:59:59Z', query: 'organization_id')]
final class ListContactsControllerBoth attributes are now repeatable, so a controller can carry a notice for itself and another for a query form; the query form's wins when the request carries it. Custom DeprecationSource implementations keep working. (#4)
Registering the status monitor yourself
Features::asyncOperations(['route' => false]) leaves the monitor route to your application, so you can document it with the rest of your API. Register it under Operations::ROUTE, which every 202's Location is built from, with a controller that returns ShowOperation's answer. The default is unchanged. (#5)
The apiguide.dev catalogue
ApiGuide is regenerated against the catalogue, which grew from 38 types to 55, among them endpoint-sunset, invalid-signature, missing-signature, idempotency-key-missing and token-revoked. The weekly catalogue check passes again. (#6)
One small behaviour change: with apiguide on, a plain abort() with 421, 423, 424, 425 or 451 now gets the matching apiguide.dev type rather than about:blank, since each of those statuses now has exactly one catalogue entry carrying its plain meaning.
Full changelog: v0.3.2...v0.3.3