Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Exception Handler broken for Laravel 8 #1095

Merged
merged 3 commits into from Sep 1, 2021

Conversation

antonioribeiro
Copy link
Member

Description

As Twill is replacing (by default) the Laravel Exception Handler, on Laravel 8 this has some bad outcomes. As the handler now uses the App\Exceptions\Handler::register() method to register new closure handlers, this method is never called by Twill and this would never work:

    /**
     * Register the exception handling callbacks for the application.
     *
     * @return void
     */
    public function register()
    {
        $this->renderable(function (MyException $e) {
            return response()->view('errors.exception', [], 500);
        });
    }

Solution

Instead of extending Illuminate\Foundation\Exceptions\Handler, we can probably extend App\Exceptions\Handler as this class will always exist on new Laravel applications and it also extends Laravel's Exception handler.

@ifox ifox merged commit 76890ff into area17:2.x Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants