This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Briddle
Briddle

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

followed by:

PHP Fatal error:  Uncaught ReflectionException: Class October\Rain\Foundation\Exception\Handler does not exist in vendor\laravel\framework\src\Illuminate\Container\Container.php:803
  1. I focused on the first error, assuming that fixing that one would likely also solve the second error.
  2. I stumbled upon the following: https://github.com/laravel/framework/discussions/33098

Debugging

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.

daftspunky
daftspunky

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.

Briddle
Briddle

That looks like a very plausible scenario. I will check.

Thanks!

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.