FrankenPHP Symfony Runtime
A Symfony Runtime component for running Symfony applications on the FrankenPHP server.
Repository Health
Technical Analysis
runtime/frankenphp-symfony is a runtime adapter that plugs Symfony’s Runtime component into FrankenPHP, the modern PHP application server built on Caddy. By setting the APP_RUNTIME environment variable to this package’s Runtime class, a standard Symfony application boots under FrankenPHP without changes to its front controller.
It is part of the php-runtime family of runtimes and unlocks FrankenPHP’s high-performance worker mode, where the Symfony kernel stays resident in memory between requests instead of bootstrapping on every request. This dramatically reduces per-request overhead for production Symfony deployments.
What You Get
- A
Runtimeclass registered via theAPP_RUNTIMEenvironment variable - A
Runnerthat keeps the Symfony kernel resident and handles requests in FrankenPHP worker mode - Zero-change integration with the standard Symfony
autoload_runtime.phpfront controller - Support for FrankenPHP’s worker configuration for reduced per-request bootstrap cost
- Membership in the php-runtime ecosystem alongside other Symfony runtime adapters
Common Use Cases
- Running a Symfony application on FrankenPHP in production
- Enabling worker mode to keep the Symfony kernel warm between requests
- Deploying Symfony via the dunglas/frankenphp Docker image
- Improving throughput of Symfony APIs without changing application code
Under The Hood
Architecture - The package is intentionally tiny: src/Runtime.php implements Symfony’s RuntimeInterface, resolving the application callable and returning a Runner. src/Runner.php implements RunnerInterface and contains the FrankenPHP worker loop that repeatedly accepts requests, dispatches them through the resident Symfony HttpKernel, and sends responses, calling frankenphp_handle_request under the hood. Because it hooks into Symfony’s Runtime abstraction, the application’s public/index.php needs no FrankenPHP-specific code.
Tech Stack - Pure PHP built on the symfony/runtime contracts and the FrankenPHP server runtime. Distributed via Composer as runtime/frankenphp-symfony, tested with PHPUnit (phpunit.xml.dist).
Code Quality - The surface area is two focused classes with a companion tests/ suite. Its simplicity is a feature: by delegating almost everything to Symfony’s Runtime component and FrankenPHP, there is little bespoke logic to maintain, though the repository itself sees infrequent updates.
API Design - There is effectively no code-level API to learn: integration is entirely configuration-driven through the APP_RUNTIME environment variable, which is the idiomatic Symfony Runtime pattern. This makes adoption nearly frictionless for teams already using the Symfony Runtime component.