0

A required bundle in one of my symfony applications causes a Deprecated notice in another bundle since a recent composer update. This of course is nothing unusual.

However, this notice is shown in the production environment (via app.php) in the frontend. I was under the impression, that if the second parameter of the Kernel constructor ($debug) is false, no notice, warning or error will be shown in the frontend. They should only get logged (according to the monolog settings).

Is there any other configuration of Symfony that might cause deprecated notices to show up in the production environment in the frontend?

The used Symfony version is v2.8.3 in this case.

fritzmg
  • 2,494
  • 3
  • 21
  • 51
  • http://stackoverflow.com/questions/28850809/disable-deprecated-warning-in-symfony-2-7 Did you look at this? – kkochanski Mar 14 '16 at 13:18
  • Yes, but the accepted answer seems dubious to me. I doubt that Symfony(2)'s default error handler does not handle deprecated notices at all? Thus I am guessing something else must be at fault here. – fritzmg Mar 14 '16 at 13:58
  • @fritzmg please try the solution in the linked question and report it in your question if it doesn't work. – A.L Mar 14 '16 at 14:42
  • @A.L this workaround works of course: http://stackoverflow.com/a/28865489/374996 . But that's not the point - it is only a workaround. The point of this question is to find out why deprecated notices (i.e. messages of the type `php.INFO`) are displayed in the frontend instead of just logged into the configured log. – fritzmg Mar 14 '16 at 14:45
  • You should probably have another look at how `display_errors` and `error_reporting` settings are set in the production php.ini . The issue could stem from there. – Radu Murzea Mar 20 '16 at 17:39
  • If your PHP application is using a custom error handler, you have full control over what errors are display where (except for "E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called" - http://php.net/manual/en/function.set-error-handler.php), regardless of your the server's PHP setting. Since the symfony error handler _does_ catch `E_USER_DEPRECATED` errors in the debug environment, I consider it a bug within the error handler of Symfony. – fritzmg Mar 21 '16 at 13:13

0 Answers0