Repository navigation
Let the application register the status monitor route - #5
Merged
Merged
Conversation
The monitor route is registered by the package, so an application that documents its API with controller attributes, as Kit does with Scribe, had no controller to put them on. Pingback registered its own route over the package's, same URI and name, and relied on registration order. Features::asyncOperations(['route' => false]) now leaves the route to the application, which names it Operations::ROUTE so every 202's Location still points at it.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
JustSteveKing
added a commit
that referenced
this pull request
Oct 30, 2026
The limiter counts whole seconds, so a run whose requests straddled a second boundary got Retry-After: 59 and t=59 where the tests asserted 60. It failed CI once on PHP 8.4, on the merge of #5. With time frozen in beforeEach, every request in a test lands in one second, and the test that travels 20 seconds still does.
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.
The status monitor route is registered by the package, pointing at its own
ShowOperation. An application that documents its API with controller attributes, as Kit does with Scribe, has nothing to put them on, and Kit's contract test then finds an undocumentedv1/route.Pingback worked around it by registering its own route at the same URI and under the same name, relying on registration order to win.
Features::asyncOperations(['route' => false])now leaves the route to the application. It registers its own, namedOperations::ROUTE, which every 202'sLocationis built from, with a controller that returnsShowOperation's answer:true, so nothing changes for anyone who doesn't set it.Features::asyncOperations()option shape, and the Boost skill's writes reference all cover it.tests/AppMonitorRoutesuite, with the option off: the package registers no route, and a 202 points at the application's route, which answers as the package's would. Both fail without the option.