->
setDefinition([ new InputArgument('name', InputArgument::OPTIONAL, 'A service name (foo)'
),
new InputOption('show-arguments', null, InputOption::VALUE_NONE, 'Show arguments in services'
),
new InputOption('show-hidden', null, InputOption::VALUE_NONE, 'Show hidden (internal) services'
),
new InputOption('tag', null, InputOption::VALUE_REQUIRED, 'Show all services with a specific tag'
),
new InputOption('tags', null, InputOption::VALUE_NONE, 'Display tagged services for an application'
),
new InputOption('parameter', null, InputOption::VALUE_REQUIRED, 'Display a specific parameter for an application'
),
new InputOption('parameters', null, InputOption::VALUE_NONE, 'Display parameters for an application'
),
new InputOption('types', null, InputOption::VALUE_NONE, 'Display types (classes/interfaces) available in the container'
),
new InputOption('env-var', null, InputOption::VALUE_REQUIRED, 'Display a specific environment variable used in the container'
),
new InputOption('env-vars', null, InputOption::VALUE_NONE, 'Display environment variables used in the container'
),
new InputOption('format', null, InputOption::VALUE_REQUIRED,
sprintf('The output format ("%s")',
implode('", "',
$this->
getAvailableFormatOptions())), 'txt'
),
new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw description'
),
new InputOption('deprecations', null, InputOption::VALUE_NONE, 'Display deprecations generated when compiling and warming up the container'
),
]) ->
setHelp(<<<'EOF'
The <info>%command.name%</info> command displays all configured <comment>public</comment> services:
<info>php %command.full_name%</info>
To see deprecations generated during container compilation and cache warmup, use the <info>--deprecations</info> option:
<info>php %command.full_name% --deprecations</info>
To get specific information about a service, specify its name:
<info>php %command.full_name% validator</info>
To get specific information about a service including all its arguments, use the <info>--show-arguments</info> flag:
<info>php %command.full_name% validator --show-arguments</info>
To see available types that can be used for autowiring, use the <info>--types</info> flag:
<info>php %command.full_name% --types</info>
To see environment variables used by the container, use the <info>--env-vars</info> flag:
<info>php %command.full_name% --env-vars</info>
Display a specific environment variable by specifying its name with the <info>--env-var</info> option:
<info>php %command.full_name% --env-var=APP_ENV</info>
Use the --tags option to display tagged <comment>public</comment> services grouped by tag:
<info>php %command.full_name% --tags</info>
Find all services with a specific tag by specifying the tag name with the <info>--tag</info> option:
<info>php %command.full_name% --tag=form.type</info>
Use the <info>--parameters</info> option to display all parameters:
<info>php %command.full_name% --parameters</info>
Display a specific parameter by specifying its name with the <info>--parameter</info> option:
<info>php %command.full_name% --parameter=kernel.debug</info>
By default, internal services are hidden. You can display them
using the <info>--show-hidden</info> flag:
<info>php %command.full_name% --show-hidden</info>