Skip to content

[5.8] Allow custom Whoops handlers#29564

Merged
taylorotwell merged 1 commit intolaravel:5.8from
sschlein:allow-custom-whoops-handler
Aug 14, 2019
Merged

[5.8] Allow custom Whoops handlers#29564
taylorotwell merged 1 commit intolaravel:5.8from
sschlein:allow-custom-whoops-handler

Conversation

@sschlein
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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