{{editor}}'s edit
{{editor}}'s edit
Loading...
Sorry, something went wrong.
-
It seems the Kernel itself handles silenced deprecation aggregation by adding an error handler (with We need these deprecation notices to help upgrade to Symfony 4, but capturing them is incredibly difficult without logging. To make matters worse, this projects eschews Monolog Bundle in favour of its own logging solution, so even if there was log support for silenced deprecations, it is unlikely it would work out of the box in this project, hence I need to understand how this works (if it works) and what other ways we might capture these deprecation messages. I should also mention that, on a particular page, two of these deprecations actually do get logged, but that's only two out of a total of 30. For these two specifically, Edit: seems like the other 28 errors are captured during container initialization and have nothing to do with the specific page I am looking at; they will be shown on every page until the container is rebuilt. |
Beta Was this translation helpful? Give feedback.
-
It seems the answer is that However, it is crucial to understand the difference between container compilation deprecations and runtime deprecations because only the latter can be logged to a file; the former are only displayed in the Web Developer Toolbar if, and only if, the default logger implements |
Beta Was this translation helpful? Give feedback.
It seems the answer is that
DebugBundle
must be enabled anddebug
mode must also be enabled. This is all that is required forErrorHandler
to set up a PHP error handler that will capture silenced deprecation notices and forward them to the (default?) logger.However, it is crucial to understand the difference between container compilation deprecations and runtime deprecations because only the latter can be logged to a file; the former are only displayed in the Web Developer Toolbar if, and only if, the default logger implements
DebugLoggerInterface
.