themosis / framework

The Themosis framework core.
https://framework.themosis.com/
GNU General Public License v2.0
671 stars 121 forks source link

Class FatalThrowableError not found #896

Open TetsuyaXD opened 1 year ago

TetsuyaXD commented 1 year ago

Description

Class "Symfony\Component\Debug\Exception\FatalThrowableError\" not found (...) at .../vendor/themosis/framework/src/Core/helpers.php:829

if (! function_exists('report')) {
    /**
     * Report an exception.
     *
     * @param \Exception $exception
     */
    function report($exception)
    {
        if ($exception instanceof Throwable &&
            ! $exception instanceof Exception) {
            $exception = new FatalThrowableError($exception);
        }
        app(ExceptionHandler::class)->report($exception);
    }
}

Steps to reproduce

Call the report function passing a Throwable (no Exception), f.e. report(new Error());

Tested on a clean install, couldn't find the symfony/debug package in the dependency tree either

Expected behavior

Throwable being wrapped using the FatalThrowableError class thus handling the corresponding exception instead of throwing a new one