themosis / framework

The Themosis framework core.

Home Page:https://framework.themosis.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Class FatalThrowableError not found

TetsuyaXD opened this issue · comments

  • Themosis Version: 3.1.0
  • WordPress Version: 6.1.1
  • PHP Version: 8.1.16

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