stefna / bugsnag-bref-resolver
Installs: 1 278
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
Requires (Dev)
- bref/bref: ^1.4.1
- bugsnag/bugsnag: ^3.26
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^9.0
- psr/http-server-middleware: ^1.0
- stefna/codestyle: ^1.2
This package is auto-updated.
Last update: 2024-10-24 09:18:07 UTC
README
Custom resolver for bugsnag/bugsnag
to help populate request context when using Type handlers
For now, it only handles HttpRequestEvent
but it would be easy to implement support for the rest of the different event types.
Installation
$ composer require stefna/bugsnag-bref-resolver
Usage
use Bugsnag\Client; use Bugsnag\Configuration; use Bugsnag\Handler; use Stefna\BugsnagBrefResolver\BrefResolver; use Stefna\BugsnagBrefResolver\Middleware\BrefResolverMiddleware; $env = new Env(); $config = new Configuration($apiKey); // Should probably be coming from a di container $resolver = new BrefResolver; $client = new Client($config, $resolver); $client->registerDefaultCallbacks(); Handler::register($client); $middleware = new BrefResolverMiddleware($resolver): // add to middleware dispatcher