This PR adds support for applications to pass a Guzzle instance to Bugsnag. This allows for configuring things like timeouts, proxy servers, add middleware etc...
We will read the service defined as bugsnag.guzzle if one exists, otherwise we create one internally as before. We also support passing the name of the service in Bugsnag configuration, so that users can pass a Guzzle instance that they already have configured
How to use
Register a service that returns a Guzzle client, e.g.
Goal
This PR adds support for applications to pass a Guzzle instance to Bugsnag. This allows for configuring things like timeouts, proxy servers, add middleware etc...
We will read the service defined as
bugsnag.guzzle
if one exists, otherwise we create one internally as before. We also support passing the name of the service in Bugsnag configuration, so that users can pass a Guzzle instance that they already have configuredHow to use
Register a service that returns a Guzzle client, e.g.
Then tell Bugsnag about it:
You can also register your service as 'bugsnag.guzzle' to avoid having to tell Bugsnag about it explicitly, e.g.
Then you can omit 'guzzle' from Bugsnag's configuration:
These examples use a factory, but any service definition that results in a
GuzzleHttp\ClientInterface
will work, for example:Testing