Symfony 7 cheatsheet

Symfony 7: Debugging and cache

7 common Symfony 7 tasks.

List routes

Show all routes with their paths and controllers.

php bin/console debug:router

List services

Show the services available in the container.

php bin/console debug:container

Show configuration

Print the resolved configuration of a bundle.

php bin/console debug:config framework

Find autowirable services

Search for services you can type-hint.

php bin/console debug:autowiring mailer

Clear the cache

Clear the cache for the current environment.

php bin/console cache:clear

Lint YAML config

Check YAML files for syntax errors.

php bin/console lint:yaml config

Lint Twig templates

Check Twig templates for syntax errors.

php bin/console lint:twig templates

Was this page helpful?