diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php index aee0eb1f00..6b20a42f45 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php @@ -13,7 +13,6 @@ namespace Symfony\Bundle\FrameworkBundle\Command; use Symfony\Component\Config\Definition\ConfigurationInterface; use Symfony\Component\Console\Helper\Table; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\StyleInterface; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; @@ -26,7 +25,7 @@ use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; */ abstract class AbstractConfigCommand extends ContainerDebugCommand { - protected function listBundles(OutputInterface $output) + protected function listBundles($output) { $headers = array('Bundle name', 'Extension alias'); $rows = array(); @@ -35,12 +34,10 @@ abstract class AbstractConfigCommand extends ContainerDebugCommand $rows[] = array($bundle->getName(), $extension ? $extension->getAlias() : ''); } - $message = 'Available registered bundles with their extension alias if available:'; if ($output instanceof StyleInterface) { - $output->writeln(' '.$message); $output->table($headers, $rows); } else { - $output->writeln($message); + $output->writeln('Available registered bundles with their extension alias if available:'); $table = new Table($output); $table->setHeaders($headers)->setRows($rows)->render($output); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php index 67ab40e0e9..cd4b153994 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php @@ -66,6 +66,8 @@ EOF $name = $input->getArgument('name'); if (empty($name)) { + $output->comment('Provide the name of a bundle as the first argument of this command to dump its configuration.'); + $output->newLine(); $this->listBundles($output); return; @@ -85,9 +87,9 @@ EOF $config = $processor->processConfiguration($configuration, $configs); if ($name === $extension->getAlias()) { - $output->writeln(sprintf('# Current configuration for extension with alias: "%s"', $name)); + $output->title(sprintf('Current configuration for extension with alias "%s"', $name)); } else { - $output->writeln(sprintf('# Current configuration for "%s"', $name)); + $output->title(sprintf('Current configuration for "%s"', $name)); } $output->writeln(Yaml::dump(array($extension->getAlias() => $config), 3)); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php index 202cc107c8..de9e1af0ad 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php @@ -71,6 +71,8 @@ EOF $name = $input->getArgument('name'); if (empty($name)) { + $output->comment('Provide the name of a bundle as the first argument of this command to dump its default configuration.'); + $output->newLine(); $this->listBundles($output); return;