Download the PHP package hannesvdvreken/guzzle-debugbar without Composer
On this page you can find all versions of the php package hannesvdvreken/guzzle-debugbar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hannesvdvreken/guzzle-debugbar
More information about hannesvdvreken/guzzle-debugbar
Files in hannesvdvreken/guzzle-debugbar
Package guzzle-debugbar
Short Description A Guzzle middleware that logs requests to debugbar's timeline
License MIT
Informations about the package guzzle-debugbar
Guzzle middleware to log requests to PHP DebugBar's timeline
⚠️ This project is up for adoption. Get in touch if you're interested in actively maintaining 3 closely related packages.
Guzzle middleware to log requests to DebugBar's timeline.
Installation
Usage
Just six lines of code are needed to log your requests to DebugBar's timeline.
Now $client
is ready to make requests. Every request is now logged to the timeline.
Recommended: use Guzzle's Log middleware
Support
Laravel
It is recommended to have my friend Barry's laravel-debugbar installed and configured. Make sure to include his and our service providers your app's providers
array:
If you want to use a different DebugBar\DebugBar
instance, create a ServiceProvider that binds an
instance with the key debugbar
. For example with this register method:
Be sure to create every client (type hint with GuzzleHttp\ClientInterface
or GuzzleHttp\Client
) via the IoC container.
FAQ:
I get one of these errors:
'time' is not a registered collector
'exceptions' is not a registered collector
It means you disabled the time
collector and/or the exceptions
collector in your packages/barryvdh/laravel-debugbar/config.php
. These are enabled by default. This package depends on it, so please enable them both.
Contributing
Feel free to make a pull request. Please try to be as
PSR-2
compliant as possible. Fix Code Style quickly by running vendor/bin/php-cs-fixer fix
. Give a good description of what is supposed to be added/changed/removed/fixed.
Testing
To test your code before pushing, run the unit test suite.
License
MIT