FrankenPHP Symfony Runtime

A Symfony Runtime component for running Symfony applications on the FrankenPHP server.

Library
Composer
v1.0.0
69stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
33/100Needs Attention
Development Activity0
Maintenance20
Community40
Maturity52
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
79/100Good
Architecture76
Code Quality74
Innovation78
Learning Curve88

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 Runtime class registered via the APP_RUNTIME environment variable
  • A Runner that keeps the Symfony kernel resident and handles requests in FrankenPHP worker mode
  • Zero-change integration with the standard Symfony autoload_runtime.php front 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.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search