php bin/console debug:container
Display current services for an application
Usage
debug:container [--show-arguments] [--show-hidden] [--tag TAG] [--tags] [--parameter PARAMETER] [--parameters] [--types] [--env-var ENV-VAR] [--env-vars] [--format FORMAT] [--raw] [--deprecations] [--] [<name>]
Arguments
name A service name (foo)
Options
--show-arguments Show arguments in services
--show-hidden Show hidden (internal) services
--tag Show all services with a specific tag
--tags Display tagged services for an application
--parameter Display a specific parameter for an application
--parameters Display parameters for an application
--types Display types (classes/interfaces) available in the container
--env-var Display a specific environment variable used in the container
--env-vars Display environment variables used in the container
--format The output format (txt, xml, json, or md)
--raw To output raw description
--deprecations Display deprecations generated when compiling and warming up the container
Help
The debug:container command displays all configured public services:
php bin/console debug:container
To see deprecations generated during container compilation and cache warmup, use the --deprecations option:
php bin/console debug:container --deprecations
To get specific information about a service, specify its name:
php bin/console debug:container validator
To get specific information about a service including all its arguments, use the --show-arguments flag:
php bin/console debug:container validator --show-arguments
To see available types that can be used for autowiring, use the --types flag:
php bin/console debug:container --types
To see environment variables used by the container, use the --env-vars flag:
php bin/console debug:container --env-vars
Display a specific environment variable by specifying its name with the --env-var option:
php bin/console debug:container --env-var=APP_ENV
Use the --tags option to display tagged public services grouped by tag:
php bin/console debug:container --tags
Find all services with a specific tag by specifying the tag name with the --tag option:
php bin/console debug:container --tag=form.type
Use the --parameters option to display all parameters:
php bin/console debug:container --parameters
Display a specific parameter by specifying its name with the --parameter option:
php bin/console debug:container --parameter=kernel.debug
By default, internal services are hidden. You can display them
using the --show-hidden flag:
php bin/console debug:container --show-hidden