-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpKernel] Fix logging deprecations to the "php" channel when channel "deprecation" is not defined #52707
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
Conversation
nicolas-grekas
commented
Nov 23, 2023
Q | A |
---|---|
Branch? | 5.4 |
Bug fix? | yes |
New feature? | no |
Deprecations? | no |
Issues | Fix #52672 |
License | MIT |
…el "deprecation" is not defined
This will not log deprecations at all when not using MonologBundle and also won't log them at all when using MonologBundle without explicitly creating a This re-introduces the same issue than what was fixed previously. The "bug" you tried to fix is that someone was relying on the previous regression as a feature rather than a bug. So -1 for me. |
To me this will log deprecations on the php channel, as wanted |
I think you missed that deprecations will go on the logger defined as $logger argument when $deprecationLogger is null. |
If this is indeed the case, why did we have to replace the usage of |
We did that to wire "logger" by default so that when monolog is not there, we still have a logger for the php notices/deprecations. |
but you now wire |
Sure, that's the code in DebugHandlersListener that does the trick: symfony/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php Lines 169 to 177 in 1199090
|