Skip to content

Commit f5e5f35

Browse files
[Console] enable describing commands in ways that make the list command lazy
1 parent ec21bd2 commit f5e5f35

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Resources/config/services.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
1313

14+
use Monolog\Formatter\FormatterInterface;
1415
use Symfony\Bridge\Monolog\Command\ServerLogCommand;
16+
use Symfony\Bridge\Monolog\Formatter\ConsoleFormatter;
1517
use Symfony\Bridge\Twig\Extension\DumpExtension;
1618
use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector;
1719
use Symfony\Component\HttpKernel\EventListener\DumpListener;
@@ -127,9 +129,12 @@
127129
'html' => inline_service(HtmlDescriptor::class)->args([service('var_dumper.html_dumper')]),
128130
],
129131
])
130-
->tag('console.command', ['command' => 'server:dump'])
132+
->tag('console.command')
131133

132134
->set('monolog.command.server_log', ServerLogCommand::class)
133-
->tag('console.command', ['command' => 'server:log'])
134135
;
136+
137+
if (class_exists(ConsoleFormatter::class) && interface_exists(FormatterInterface::class)) {
138+
$container->services()->get('monolog.command.server_log')->tag('console.command');
139+
}
135140
};

0 commit comments

Comments
 (0)