cms icon indicating copy to clipboard operation
cms copied to clipboard

Class "Symfony\Component\Debug\Exception\FatalThrowableError" not found

Open MrMooky opened this issue 3 years ago • 1 comments

Bug description

While going through the logs in Bugsnag, I saw this happening a few times. I haven't received any of those errors myself, but apparently some of the users did.

When opening a collection entry, sometimes this error occurs:

Class "Symfony\Component\Debug\Exception\FatalThrowableError" not found

In this line: vendor/statamic/cms/src/Http/Controllers/CP/PreviewController.php:58

https://github.com/statamic/cms/blob/3.2/src/Http/Controllers/CP/PreviewController.php#L58

    app(ExceptionHandler::class)->report($e);
    $response = app(ExceptionHandler::class)->render($subrequest, $e);
} catch (Throwable $e) {
    app(ExceptionHandler::class)->report($e = new FatalThrowableError($e));
    $response = app(ExceptionHandler::class)->render($subrequest, $e);
}

How to reproduce

I honestly don't know. Apparently this has something to do with previewing an entry. I tried it myself and haven't received any error.

Logs

No response

Versions

Statamic 3.2.18 Pro Laravel 8.67.0 PHP 8.0.11 jacksleight/bard-paragraph-style 1.2.2 jonassiewertsen/statamic-livewire 2.7.0 octoper/statamic-blade-components 1.0.1 optimoapps/statamic-bard-text-align 1.0.2

Installation

Existing Laravel app

Additional details

No response

MrMooky avatar Oct 29 '21 06:10 MrMooky

Looks like FatalThrowableError is deprecated, and has probably been removed in Symfony 5. That'd be it.

jasonvarga avatar Oct 29 '21 18:10 jasonvarga

Closing this as we're no longer throwing this exception anywhere.

duncanmcclean avatar Nov 21 '23 09:11 duncanmcclean