Closed
Description
Symfony version(s) affected
6.4.x-dev
Description
On a freshly installed project, commands are not working when APP_DEBUG=false
In CheckExceptionOnInvalidReferenceBehaviorPass.php line 88:
The service "data_collector.dump" has a dependency on a non-existent service ".virtual_request_stack".
How to reproduce
symfony new --webapp --version=next debug-console \
&& cd debug-console \
&& APP_DEBUG=false php bin/console about
Details / explanation
In the DebugBundle / services.php
->set('data_collector.dump', DumpDataCollector::class)
->public()
->args([
service('debug.stopwatch')->ignoreOnInvalid(),
service('debug.file_link_formatter')->ignoreOnInvalid(),
param('kernel.charset'),
service('.virtual_request_stack'),
null, // var_dumper.cli_dumper or var_dumper.server_connection when debug.dump_destination is set
])
->tag('data_collector', [
'id' => 'dump',
'template' => '@Debug/Profiler/dump.html.twig',
'priority' => 240,
])
In the FrameworkBundle / debug.php
->set('.virtual_request_stack', VirtualRequestStack::class)
->args([service('request_stack')])
->public()