I encountered these 2 errors when saving the settings for an October CMS 1.x theme in October CMS 2.x:
PHP Fatal error: Declaration of Illuminate\Foundation\Exceptions\Handler::report(Exception $e) must be compatible with Illuminate\Contracts\Debug\ExceptionHandler::report(Throwable $e) in vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php on line 101
PHP Fatal error: Uncaught ReflectionException: Class October\Rain\Foundation\Exception\Handler does not exist in vendor\laravel\framework\src\Illuminate\Container\Container.php:803
- I focused on the first error, assuming that fixing that one would likely also solve the second error.
- I stumbled upon the following: https://github.com/laravel/framework/discussions/33098
Changing Exception to Throwable in:
- vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php (101, 135, 192, 508)
- vendor/october/rain/src/Foundation/Exceptions/Handler.php (45, 95)
seems to fix this error.
Answered this in more detail via email. But it looks like something has imported Laravel 7+. The type hint is
Throwable in Laravel 7+ but
Exception in Laravel 6.
... it could be a plugin's composer dependencies.
That looks like a very plausible scenario. I will check.
1-3 of 3