Skip to main content
The bundle includes three independent demo applications — one for each supported Symfony version. Each runs with FrankenPHP and Caddy inside Docker and can be started independently.
The demo/ folder is not included when you install the bundle via Composer. It exists only in the source repository. To run the demos, clone the repository first.

Demo applications

Each demo includes:
  • Independent docker-compose.yml for easy setup
  • Complete test suite to verify bundle integration
  • Example controller and Twig templates
  • Web Profiler integration
  • 100% code coverage for demo code
To run multiple demos at once, set a different PORT in each demo’s .env file (for example, 8006, 8007, 8008).

Starting a demo

1

Start the container and install dependencies

From the bundle root:
This builds the image, installs Composer dependencies, clears the Symfony cache, and starts the server.
2

Open the demo

Navigate to http://localhost:8001 in your browser.The Twig Inspector toolbar appears at the bottom of the page.
Alternatively, use docker-compose directly:

Makefile helpers

You can also use the demo/ Makefile to manage all demos from one place:

Running demo tests

Each demo has its own test suite with code coverage:
Or run directly inside a demo directory:

FrankenPHP configuration

Each demo runs FrankenPHP (Caddy + PHP in a single container) with two Caddyfile configurations: The demos run in development mode by default. The Docker entrypoint detects APP_ENV=dev and copies Caddyfile.dev (no worker, cache-busting headers) over the default Caddyfile before starting FrankenPHP.

Development Caddyfile

Do not add a worker directive inside php_server in the dev Caddyfile. With worker mode enabled, template changes won’t appear until the workers are restarted.

Production Caddyfile

To run a demo in production mode, set APP_ENV=prod and APP_DEBUG=0 in the container environment and restart:

Troubleshooting

  • Verify worker mode is off in the active Caddyfile (Caddyfile.dev has no worker inside php_server).
  • Check that config/packages/dev/twig.yaml sets twig.cache: false.
  • Check that docker/php-dev.ini is mounted and sets opcache.revalidate_freq=0.
  • Restart the container after changing the Caddyfile: docker-compose restart or make -C demo/symfony8 restart.
  • Hard-refresh the browser (Ctrl+Shift+R) or try a private window.
  • Confirm APP_ENV=dev and APP_DEBUG=1 are set in the container.
  • Ensure WebProfilerBundle, DebugBundle, and NowoTwigInspectorBundle are enabled for dev in config/bundles.php.
  • Clear the Symfony cache:
The Makefile runs composer install and cache:clear in one-off containers before starting the server, then waits for an HTTP response on the configured port. Check that:
  • The port in .env (default PORT=8001) is not already in use.
  • The container started successfully: docker-compose logs php.
  • Required env vars such as APP_SECRET are set.
The Caddyfile is read when FrankenPHP starts. Restart the container after any changes:
In dev mode, the entrypoint copies Caddyfile.dev over the default. Make sure you edited Caddyfile.dev and that it is mounted correctly.