8000 [FrameworkBundle] Better output for user in ContainerDebugCommand · symfony/symfony@313d8b1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 313d8b1

Browse files
committed
[FrameworkBundle] Better output for user in ContainerDebugCommand
1 parent 5f8a196 commit 313d8b1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
121121
$options['output'] = $io;
122122
$helper->describe($output, $object, $options);
123123

124-
if (!$input->getArgument('name') && $input->isInteractive()) {
125-
$io->comment('To search for a specific service, re-run this command with a search term. (e.g. <comment>debug:container log</comment>)');
124+
if (!$input->getArgument('name') && !$input->getOption('tag') && !$input->getOption('parameter') && $input->isInteractive()) {
125+
if ($input->getOption('tags')) {
126+
$io->comment('To search for a specific tag, re-run this command with a search term. (e.g. <comment>debug:container --tag=form.type</comment>)');
127+
} elseif ($input->getOption('parameters')) {
128+
$io->comment('To search for a specific parameter, re-run this command with a search term. (e.g. <comment>debug:container --parameter=kernel.debug</comment>)');
129+
} else {
130+
$io->comment('To search for a specific service, re-run this command with a search term. (e.g. <comment>debug:container log</comment>)');
131+
}
126132
}
127133
}
128134

0 commit comments

Comments
 (0)
0