yiisoft/yii-runner
Base runner infrastructure for Yii applications, providing a common interface and helpers for bootstrapping the dependency injection container and executing an app. Pair it with HTTP or console runner packages to create clean, environment-specific entry scripts.
yii-runner exists to separate application bootstrap from how the process is invoked — a single runner contract with implementations for classic PHP-FPM, console, and long-running worker runtimes (RoadRunner, Swoole). This is the exact decision surface for any "do we move to persistent workers?" initiative, and the package is a working reference architecture for it.Consider reading (not installing) it when:
Look elsewhere — decisively — when:
yii-runner in a Laravel app is not viable; it targets Yii's application/DI contracts.public/index.php).Net: evaluate as a design reference, reject as a dependency.
For executives (30 seconds): We looked at yii-runner, a small open-source component from the Yii framework team that standardizes how a PHP app starts up across different execution models — traditional web requests, command line, and modern always-on worker processes. Recommendation: do not adopt it. It's built for a different framework (Yii, not ours), has negligible adoption (17 stars, 0 downstream users), and solves a problem our stack already solves. It is useful to us only as a free, permissively licensed reference design — which we can study at zero cost and zero risk.
For engineering: The valuable idea is the seam it draws: an application runner interface with one adapter per runtime, so bootstrap, request handling, and process lifecycle stay decoupled. That's directly relevant to our Octane/worker-mode work — particularly the per-process-vs-per-request state question, which is where these migrations usually break. Action: one engineer spends half a day reading the runner and worker-mode adapters and writes up the state-lifecycle model; we apply the pattern in our own bootstrap and take no new dependency. License is BSD-3, so even direct code reuse of small snippets is permissible, though I'd prefer we reimplement rather than vendor from an unmaintained-by-our-standards project.
Risk statement: Low. No dependency added, no procurement, no vendor relationship. The only cost is a few hours of engineering reading time, and the only risk is over-indexing on a low-adoption codebase — mitigated by treating it as a pattern source rather than a library.
How can I help you explore Laravel packages today?