Repository navigation
Releases
v0.3.4
A fix to the test suite only. The package itself is unchanged from 0.3.3: /tests isn't in the archive Composer installs, so there's nothing to upgrade for.
Tests
- The rate-limit header tests freeze time. The limiter counts whole seconds, so a run whose requests crossed a second boundary got
Retry-After: 59where the tests asserted60, and CI failed once on PHP 8.4. Reproduced by starting each test just before a second boundary, then fixed withfreezeTime(). (#7)
Full changelog: v0.3.3...v0.3.4
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
v0.3.2
What's Changed
- Nested route validators, route-level consumes, encrypted idempotency storage by @JustSteveKing in #3
Full Changelog: v0.3.1...v0.3.2
v0.3.1
What's Changed
- Resolve request state from the Octane sandbox, not the booted application by @JustSteveKing in #2
Full Changelog: v0.3.0...v0.3.1
v0.3.0
What's Changed
- Translatable problem details, CursorPage typing, 415 for multipart by @JustSteveKing in #1
New Contributors
- @JustSteveKing made their first contribution in #1
Full Changelog: v0.2.0...v0.3.0
v0.2.0
Added
- Laravel Boost guideline and skill. After
php artisan boost:install(orboost:update), coding agents in your application know how to use the package. The always-loaded guideline covers checking which features are enabled, throwing problems instead of returning error JSON, and which standard to use for locking, retries,Prefer, PATCH, webhooks and pagination. Theapi-toolbox-developmentskill holds the detail, with a reference for each area. A test checks that every class, constant, middleware alias, assertion and method they mention exists, and that every PHP snippet parses. php artisan aboutsection. It shows the installed version and whether each feature is on, with experimental features marked. It also lists signature key IDs and their algorithms, never secrets or key paths. Use--only=api_toolboxto show just this section.Features::EXPERIMENTALlists the features that can change in a minor release.
Changed
- The digest problem types now come from the generated apiguide.dev catalogue, since their pages are live. The type URIs are unchanged.
v0.1.0
First release. Each feature implements an HTTP standard and is switched on or off in config/api-toolbox.php.
- Problem Details (RFC 9457), typed from the apiguide.dev error catalogue
- Deprecation and Sunset (RFC 9745, RFC 8594)
- Conditional requests (RFC 9110 §13, RFC 6585)
- Cursor pagination with Link headers (RFC 8288)
- Idempotency-Key (draft-ietf-httpapi-idempotency-key-header-07)
- RateLimit headers (draft-ietf-httpapi-ratelimit-headers-11), experimental
- Preferences (RFC 7240) and async operations (202, then 303)
- JSON Merge Patch (RFC 7396)
- Digest Fields (RFC 9530)
- HTTP Message Signatures (RFC 9421), replacing juststeveking/laravel-webhooks
- API catalog (RFC 9727)
- Negotiation: 406, 415, W3C Trace Context and request IDs
- Test assertions for each of the above
Requires PHP 8.3 or later and Laravel 13.30 or later.
This is a 0.x release, so the API can still change between minor versions.