New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FrameworkBundle] Fix CommandDataCollector is always registered #52229
Conversation
src/Symfony/Bundle/FrameworkBundle/Resources/config/console_debug.php
Outdated
Show resolved
Hide resolved
3e1b08d
to
6e2c2ec
Compare
Thanks @smnandre |
@@ -922,7 +923,7 @@ private function registerProfilerConfiguration(array $config, ContainerBuilder $ | |||
$container->removeDefinition('console_profiler_listener'); | |||
} | |||
|
|||
if (!class_exists(CommandDataCollector::class)) { | |||
if (!$container->getParameter('kernel.debug') || !class_exists(CliRequest::class) || !class_exists(CommandDataCollector::class)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this check for kernel.debug ? If you enable the profiler in non-debug mode (for instance in tests), you will need this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, i’ll digg tomorrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line will also be reverted in #52274.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's continue discussion (or stop it) on #52274 then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found it: it was because then (non-debug mode), there is something not working, but this is not directly related to the composer conflit, and i'll open a dedicated issue.
Another attempt at fixing #52210, allowing to revert #52218 and leave the conflict constraints untouched
CommandDataCollector was always registered, and not always removed from the container when not needed/invalid.