Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Coding at the Speed of Thought: The New Era of ...

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

Coding at the Speed of Thought: The New Era of Symfony Docker

This presentation covers the evolution of Symfony DX in 2026, highlighting the integration of FrankenPHP's worker mode, hot reloading, and secure autonomous coding agents within Symfony Docker.

Avatar for Kévin Dunglas

Kévin Dunglas

March 31, 2026
Tweet

More Decks by Kévin Dunglas

Other Decks in Programming

Transcript

  1. ➔ PHP API Platform creator, Symfony Core Team ➔ Go

    FrankenPHP and Mercure.rocks creator, Caddy maintainer, Go core contributor ➔ C PHP maintainer Kévin Dunglas: Co-founder @ Les-Tilleuls.coop @[email protected] @dunglas.dev @dunglas
  2. Web and Cloud Experts ➔ Development (Symfony, React, Vue, Go,

    Rust...) ➔ Support & hosting (Symfony) apps ➔ Consultancy & maintenance ➔ UX & UI design ➔ [email protected] 💌
  3. FrankenPHP A modern app server for PHP apps: ➔ Replaces

    NGINX+FPM or Apache+mod_php ➔ Built for easy deployments: compatible with Docker, can embed your app in the binary! ➔ The fastest PHP engine, even in classic mode ➔ Compatible with all existing PHP apps and extensions: progressive enhancement
  4. FrankenPHP: Some Features ZSTANDARD, BROTLI & GZIP (PRE-)COMPRESSION Modern compression

    formats are supported out-of-the-box. Assets can be pre-compressed. STRUCTURED LOGS Bring a more defined format and details to your logging: frankenphp_log() PROMETHEUS/OPENMETRICS & OPENTELEMETRY Built-in metrics and tracing support! HTTP/3 Native support for HTTPS, HTTP/2 and HTTP/3. HTTPS AUTOMATION Automatic HTTPS certificate generation, renewal and revocation. Encrypted Client Hello support CLOUD-NATIVE API-first, Twelve-Factor, graceful reloads...
  5. ➔ Super simple to use: • Standalone binary (that can

    contain your app) • No runtime dependencies • Batteries included ➔ Built on top of the Caddy web server • All Caddy features and modules • Benefits from Go features • Extensible: in Go, in C, in PHP ➔ Designed for prod, CI and dev envs FrankenPHP: Modern PHP App Server
  6. FrankenPHP on Windows ➔ Just released (FrankenPHP 1.12) ➔ All

    FrankenPHP features are supported, including extensions, worker mode and hot reloading ➔ Relies on the official PHP distribution ➔ Possible thanks to bleeding edge features introduced in Go 1.26
  7. Symfony Docker ➔ Docker-based skeleton and installer ➔ Compatible with

    Flex configurators for Docker ➔ No local dependencies, you just need Docker ➔ No bloat, readable config: only 1 containers ➔ FrankenPHP-based ➔ Automatic TLS certificate generation and renewal ➔ Native Mercure support ➔ Prod ready: slim, rootless, image
  8. ➔ Specify how to start a fully-featured development environment in

    containers: • App, libraries, commands… • Dev tools • IDE extensions ➔ Open specification (by Microsoft): devcontainer.json ➔ Supported by: • Visual Studio Code, PHPStorm, Emacs… • GitHub Codespace • Claude Code (more about this later) Development Containers
  9. ⚡ in Production: Symfony Apps Are Compiled ➔ Config, DI,

    Routing, Twig… Symfony caches everything! ➔ The cache is populated once, ideally at build time • bin/console cache:warmup ➔ Then it is reused for each request
  10. 🐢 in Dev ➔ Each time a file (PHP, Twig,

    YAML…) is touched… ➔ … the cache must be re-populated ➔ Populating the cache means writing files on disk (slow) ➔ On large projects (ex: Sylius), this can be very slow and hurts the DX
  11. Here Comes FrankenPHP Watchers ➔ FrankenPHP will watch files or

    directory for changes ➔ When a watcher file changes, the worker script is automatically restarted ➔ By default, typical Symfony files are watched: • PHP • YAML • Twig • .env
  12. FrankenPHP: Worker Watch Mode localhost root public/ php_server { #

    Symfony 7.4+ natively supports FrankenPHP's worker mode worker { file ./public/worker.php watch } }
  13. Patterns Can Be Customized frankenphp { worker { file public/index.php

    watch /path/to/app watch /path/to/app/*.php watch /path/to/app/**/*.php watch /path/to/app/**/*.{php,twig} } }
  14. Worker In Dev Is Useful ➔ To render most web

    pages, browsers send several HTTP requests in parallel ➔ If these requests are handled by PHP (ex: JS, Turbo, React…), you’ll benefit from worker mode even in dev: the app will be hot ➔ Symfony cache is refreshed instantly, in the background, when you save a file in your editor ➔ This dramatically reduces the time before the page is available
  15. Hot Reloading ➔ JS frameworks has a nice feature: hot

    reloading (sometimes called HMR, for Hot Module Reloading) ➔ With Vite, Webpack, etc, when you change some code in your editor, the code is compiled in the background then “pushed” to the browser, which instantly updates ➔ This requires watching for file changes, and a persistent connection between the server and the browser (e.g., WebSockets)
  16. FrankenPHP Has the Infrastructure for HR FrankenPHP introduced two new

    features which bring hot reloading to PHP: ➔ File watchers ➔ mercure_publish($topic, $data): dispatch a Mercure update (Server-Sent Event-based) to all connected browsers
  17. FrankenPHP Hot Reloading FrankenPHP 1.11 contains a game-changer for PHP

    apps development: hot reloading ➔ FrankenPHP watches files (PHP, templates, JS, CSS…) for changes ➔ When a change occurs, it: • dispatches a Mercure update to the browser containing the list of changed files • reloads worker scripts if needed, refreshes the Symfony cache in the background
  18. FrankenPHP Hot Reloading # dev.Caddyfile mercure { anonymous } root

    ./public php_server { hot_reload worker { file ./public/index.php watch } }
  19. Client-Side Hot Reloading {# templates/base.html.twig #} {% set frankenphpHotReload =

    app.request.server.get('FRANKENPHP_HOT_RELOAD') %} {% if frankenphpHotReload %} <meta name="frankenphp-hot-reload:url" content="{{ frankenphpHotReload }}"> <script src="https://cdn.jsdelivr.net/npm/idiomorph"></script> <script src="https://cdn.jsdelivr.net/npm/frankenphp-hot-reload/+esm" type="module"></script> {% endif %} {# ... #}
  20. Xdebug Integration ➔ Xdebug: the most popular step by step

    debugger for PHP • Pre-installed in Symfony Docker ➔ Out of the box support when using Dev Containers • Start the project • Add a breakpoint in Visual Studio Code (the VSCode extension is preinstalled in the Dev Container) • It works! • Even with worker mode on!
  21. Can we really speak about developer eXperience in 2026 without

    mentioning coding agents? ➔ Symfony Docker now contains an integration with Claude Code ➔ No more permissions asking: YOLO! ➔ Claude is sandboxed, using Dev Containers ➔ A default firewall script, with a strict allow list (Packagist, GitHub…), is provided Coding Agents: Coding at the Speed of Thought
  22. Remote Control (Live Demo) Type /remote-control in Claude Code: ➔

    Continue your local session from any device ➔ Work from your phone using the iOS or Android app ➔ Not a cloud thing: the code is written and tested on your local computer!
  23. Thank you! Want to talk about Symfony, API Platform or

    FrankenPHP? Come at our booth! les-tilleuls.coop [email protected] @coopTilleuls