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

commented Aug 14, 2019

This PR allows packages to override the existing Whoops handler.

@taylorotwell taylorotwell merged commit 98d8425 into laravel:5.8 Aug 14, 2019

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/styleci/pr The analysis has passed
Details
return app(HandlerInterface::class);
} catch (BindingResolutionException $e) {
return (new WhoopsHandler)->forDebug();
}

This comment has been minimized.

Copy link
@crynobone

crynobone Aug 19, 2019

Contributor

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

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

return (new WhoopsHandler)->forDebug();

This comment has been minimized.

Copy link
@antonkomarev

antonkomarev Aug 19, 2019

Contributor

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

This comment has been minimized.

Copy link
@antonkomarev

antonkomarev Aug 19, 2019

Contributor

Added PR with this change #29635

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.