Monday, May 22, 2017

Lumen 5.3 & PHP 7: Symphony Error ExceptionHandler

We have a project that uses Lumen 5.3, however when we always install PHP7 on the server it gives this error:

[Symfony\Component\Debug\Exception\FatalErrorException]
  Uncaught TypeError: Argument 1 passed to Symfony\Component\Debug\ExceptionHandler::handle() must be an instance of Exception, instance of Error given in /var/www/retail-api/vendor/symfony/symfony/src/Symfony/Component/Debug/Excepti
  onHandler.php:105
  Stack trace:
  #0 [internal function]: Symfony\Component\Debug\ExceptionHandler->handle(Object(Error))
  #1 {main}
    thrown

When we revert it back to PHP5.6 it works. Based on my research this was supposed to be fixed in Symfony > 2.6 is this correct? If so why is this happening on our environment. Most of our Laravel projects are already using PHP7. This, however is an exception, is there something that I am missing?

Sorry might be a noob question. Thanks.



via Drew Adorador

Advertisement