Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors internal application runners by renaming classes and converting them to use invokable syntax. The changes prepare the codebase for future extensibility with custom application runners (queue runners, CRON, FastCGI, etc.).
- Renamed
SapiHandlertoSapiRunnerandReactiveHandlertoHttpServerRunner - Changed from
run()method to__invoke()invokable class pattern - Moved classes from
FrameworkX\Ionamespace toFrameworkX\Runnernamespace
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tests/Runner/SapiRunnerTest.php |
Updated test class name, namespace, and test methods to use invokable syntax instead of run() method |
tests/Runner/HttpServerRunnerTest.php |
Updated test class name, namespace, and test methods to use invokable syntax with added exception placeholders in handlers |
tests/ContainerTest.php |
Updated test method names from getSapi* to getRunner* and updated class references throughout |
tests/AppTest.php |
Updated property references from $sapi to $runner and test method expectations for invokable syntax |
src/Runner/SapiRunner.php |
Renamed class, moved to Runner namespace, changed to invokable with __invoke() method, updated documentation |
src/Runner/HttpServerRunner.php |
Renamed class, moved to Runner namespace, changed to invokable with __invoke() method, added required imports, updated documentation |
src/Container.php |
Updated to use new class names and getRunner() method instead of getSapi() |
src/App.php |
Updated property name to $runner, updated invocation syntax to use callable syntax, updated documentation references |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Jan 3, 2026
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.
This changeset renames the internal SAPI handlers to
HttpServerRunnerandSapiRunnerand updates the API to use invokable classes instead of arun()method. This is mostly done as an internal preparation at the moment, but may be exposed as part of our public API that allows us to reuse this logic for more classes in a follow-up.The goal is to prepare the internal APIs to allow custom application runners, think queue runners, CRON, a FastCGI server and more. Once PSR-15 is fully integrated (see wish list #293), we may decouple this further to use the PSR-15
RequestHandlerAPI. For now, the callable syntax should be good enough.Builds on top of #292, #289, #236, #224, #44, and others