Symfony ExceptionHandler throws an error about itself

I am working on updating the application to use Symfony 3 and PHP 7. I keep getting this error. I'm not sure why this is related or how to fix it.

Symfony \ Component \ Debug \ ExceptionHandler :: handle () must be an instance of Exception

+4
source share
1 answer

TL DR : A PHP error runs somewhere in your code. In PHP 5, it was launched as a simple PHP error; in PHP 7, it was passed as Error, which is now passed to the Symfony exception handler.

This error was probably always in your application and was swallowed due to settings error_reportingor display_errors.


PHP 7. Error . . :

PHP 7 , PHP. , , PHP 5, .

, Error , catch. , , set_exception_handler(), , .

, Error Exception ( Throwable).

Symfony set_exception_handler, Error , , Exception .

, ExceptionHandler ( Symfony), handle(Throwable $error), PHP.

+8

Source: https://habr.com/ru/post/1623118/


All Articles