Skip to content
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

Deprecation warnings for Symfony\Component\Debug\ExceptionHandler #54

Open
donuk opened this issue Apr 25, 2024 · 0 comments
Open

Deprecation warnings for Symfony\Component\Debug\ExceptionHandler #54

donuk opened this issue Apr 25, 2024 · 0 comments

Comments

@donuk
Copy link

donuk commented Apr 25, 2024

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?

  1. Enable full error reporting in the php config, e.g. ini_set("error_reporting", E_ALL);
  2. Trigger an error in application code (e.g. unlink("non-existent-file");
  3. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant