-
-
Notifications
You must be signed in to change notification settings - Fork 56
Support custom runner with new X_EXPERIMENTAL_RUNNER variable
#295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 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