I've upgraded to Laravel 7.1 and now with Symfony 5 these classes no longer exist:
use Symfony\Component\Debug\Exception\FlattenException;
use Symfony\Component\Debug\ExceptionHandler as SymfonyExceptionHandler;
I used them in my app\Exceptions\Handler.php file to send email notifications when exceptions re thrown and they worked well in Laravel 6, but broke when I upgrade from 6.x to 7.1.2 which also upgraded to Symfony 5.
I replaced the aforementioned classes with these:
use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer;
use Symfony\Component\ErrorHandler\Exception\FlattenException;
and then replaced this:
$e = FlattenException::create($exception);
$handler = new SymfonyExceptionHandler();
$html = $handler->getHtml($e);
with this:
$e = FlattenException::create($exception);
$handler = new HtmlErrorRenderer();
$content = $handler->getBody($e);
which works, but now instead of getting the debug content in the email like I used to, I instead get a more basic error message as it would be intended for the public.
You can see examples of the different formats here: https://symfony.com/doc/current/controller/error_pages.html
I'm sure there is something simple I'm missing, but I haven't yet figured out how to get it to send me the detailed exception data like I used to get prior to the upgrade.
Any suggestions?