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

[5.8] Allow custom Whoops handlers #29564

Merged
merged 1 commit into from
Aug 14, 2019

Conversation

sschlein
Copy link
Contributor

This PR allows packages to override the existing Whoops handler.

@taylorotwell taylorotwell merged commit 98d8425 into laravel:5.8 Aug 14, 2019
return app(HandlerInterface::class);
} catch (BindingResolutionException $e) {
return (new WhoopsHandler)->forDebug();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we use Container::bound() here?

if ($this->container->bound(HandlerInterface::class)) {
    return $this->container->make(HandlerInterface::class);
}

return (new WhoopsHandler)->forDebug();

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it will be much better than using global helper method

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added PR with this change #29635

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.

5 participants