lumberjack-core
lumberjack-core copied to clipboard
Deprecation warnings for Symfony\Component\Debug\ExceptionHandler
The exception handling code is triggering a deprecated warning while handling other errors. Each time an error is triggered my error log has 2 errors, one genuine error from my application code and then one stating that the ExceptionHandler is deprecated.
What are the steps to reproduce this issue?
- Enable full error reporting in the php config, e.g.
ini_set("error_reporting", E_ALL); - Trigger an error in application code (e.g.
unlink("non-existent-file"); - Check the error log
What happens?
2 errors are listed:
app.ERROR: ErrorException: unlink(non-existent-file): No such file or directory...app.ERROR: ErrorException: The "Symfony\\Component\\Debug\\ExceptionHandler" class is deprecated sinc e Symfony 4.4, use "Symfony\\Component\\ErrorHandler\\ErrorHandler" instead...
What were you expecting to happen?
1 error listed
app.ERROR: ErrorException: unlink(non-existent-file): No such file or directory...
Any logs, error output, etc?
app.ERROR: ErrorException: The "Symfony\\Component\\Debug\\ExceptionHandler" class is deprecated since Symfony 4.4, use "Symfony\\Component\\ErrorHandler\\ErrorHandler" instead. in /var/www/html/wp-content/themes/lumberjack/vendor/symfony/debug/ExceptionHandler.php:18
Stack trace:
#0 [internal function]: Rareloop\\Lumberjack\\Bootstrappers\\RegisterExceptionHandler->handleError(16384, 'The "Symfony\\\\Co...', '/var/www/html/w...', 18)
#1 /var/www/html/wp-content/themes/lumberjack/vendor/symfony/debug/ExceptionHandler.php(18): trigger_error('The "Symfony\\\\Co...', 16384)
#2 /var/www/html/wp-content/plugins/wordpress-seo/vendor/composer/ClassLoader.php(571): include('/var/www/html/w...')
#3 /var/www/html/wp-content/plugins/wordpress-seo/vendor/composer/ClassLoader.php(428): Composer\\Autoload\\includeFile('/var/www/html/w...')
#4 /var/www/html/wp-content/themes/lumberjack/vendor/rareloop/lumberjack-core/src/Exceptions/Handler.php(41): Composer\\Autoload\\ClassLoader->loadClass('Symfony\\\\Compone...')
#5 /var/www/html/wp-content/themes/lumberjack/app/Exceptions/Handler.php(38): Rareloop\\Lumberjack\\Exceptions\\Handler->render(Object(Laminas\\Diactoros\\ServerRequest), Object(Symfony\\Component\\Debug\\Exception\\FlattenException))
#6 /var/www/html/wp-content/themes/lumberjack/vendor/rareloop/lumberjack-core/src/Bootstrappers/RegisterExceptionHandler.php(68): App\\Exceptions\\Handler->render(Object(Laminas\\Diactoros\\ServerRequest), Object(ErrorException))
#7 [internal function]: Rareloop\\Lumberjack\\Bootstrappers\\RegisterExceptionHandler->handleException(Object(ErrorException))
#8 {main}
What versions of software are you using?
Operating System: docker container php:8.3.4-apache running under debian 11.8 PHP Version: 8.3.4 Lumberjack Version: 6.1