Support custom runner with new X_EXPERIMENTAL_RUNNER variable#295
Merged
Support custom runner with new X_EXPERIMENTAL_RUNNER variable#295
X_EXPERIMENTAL_RUNNER variable#295Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for custom application runners through a new experimental X_EXPERIMENTAL_RUNNER environment variable. This enables users to provide custom runners for advanced use cases like queue runners, CRON jobs, FastCGI servers, and other specialized application execution patterns.
Key changes:
- Introduced
X_EXPERIMENTAL_RUNNERenvironment variable support inContainer::getRunner() - Added runtime validation to ensure custom runners are callable
- Comprehensive test coverage for the new functionality including error cases
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Container.php | Modified getRunner() to check for X_EXPERIMENTAL_RUNNER environment variable and validate that returned runner is callable |
| src/App.php | Updated $runner property type annotation and documentation to reflect support for custom callable runners |
| tests/ContainerTest.php | Added three new test cases for custom runner functionality and updated existing test mocks to account for the additional X_EXPERIMENTAL_RUNNER check |
| tests/AppTest.php | Added integration test to verify custom runner is properly invoked via App::run() |
| docs/best-practices/controllers.md | Added documentation example showing how to configure X_EXPERIMENTAL_RUNNER environment variable |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
734a788 to
ab0dd15
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ab0dd15 to
5a98992
Compare
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 adds support for using a custom runner with a new
X_EXPERIMENTAL_RUNNERenvironment variable. The goal is to allow custom application runners, think queue runners, CRON, a FastCGI server and more.Note that this is an experimental feature and the API may be subject to change in future releases. 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 implemented in #294/#236 should be good enough.Builds on top of #294, #292, #289, #288, #287, #236, #224, #44, and others