Skip to content

Conversation

@clue
Copy link
Owner

@clue clue commented Jan 2, 2026

This changeset renames the internal SAPI handlers to HttpServerRunner and SapiRunner and updates the API to use invokable classes instead of a run() 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 RequestHandler API. For now, the callable syntax should be good enough.

Builds on top of #292, #289, #236, #224, #44, and others

@clue clue added this to the v0.18.0 milestone Jan 2, 2026
@clue clue requested a review from Copilot January 2, 2026 21:12
@clue clue added maintenance new feature New feature or request labels Jan 2, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SapiHandler to SapiRunner and ReactiveHandler to HttpServerRunner
  • Changed from run() method to __invoke() invokable class pattern
  • Moved classes from FrameworkX\Io namespace to FrameworkX\Runner namespace

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance new feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant