Download the PHP package playbloom/guzzle-bundle without Composer
On this page you can find all versions of the php package playbloom/guzzle-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download playbloom/guzzle-bundle
More information about playbloom/guzzle-bundle
Files in playbloom/guzzle-bundle
Package guzzle-bundle
Short Description Provide Symfony2 web profiler for Guzzle
License MIT
Homepage https://github.com/ludofleury/GuzzleBundle
Informations about the package guzzle-bundle
Guzzle Bundle

Provide a basic logger and an advanced profiler for Guzzle
- The basic logger use the default Symfony app logger, it's safe to use in your production environement.
- The advanced profiler is for debug purposes and will display a dedicated report available in the toolbar and Symfony Web Profiler



Installation
Add the composer requirements
Add the bundle to your Symfony app kernel
To enable the advanced profiler & the toolbar/web profiler panel, add this line to your app/config/config_dev.yml
Guzzle client as a Symfony service
Concrete Guzzle client creation can be easily managed by the Symfony service container thanks to a simple factory configuration, in this case, you just need to tag your guzzle service(s) with playbloom_guzzle.client
.
It will add the basic logger to your client(s). If the web_profiler is enabled in the current environement, it will also add the advanced profiler and display report on the Symfony toolbar/web profiler.
Add the logger/profiler manually to a Guzzle client
If you need to handle the registration of the logger or profiler plugin manually, you can retrieve theses services from the Symfony container.
Customize your own profiler panel
If you need a custom profiler panel you can extend/reuse easily the data collector and profiler template from this bundle.
For example, you have a GithubBundle which interact with the Github API. You also have a Github profiler panel to debug your developement and you want to have the API requests profiled in this panel.
It's quite easy:
First, define your own GithubDataCollector
extending the Playbloom\Bundle\GuzzleBundle\DataCollector\GuzzleDataCollector
Then extends the guzzle web profiler template
And finally declare your data collector
That's it, now your profiler panel displays your custom information and the Guzzle API requests.
TODO
- Add extra information about the client configuration itself (thanks to the guzzle service builder?)
- Add clients|host|endpoint|time filters for http requests
Licence
This bundle is under the MIT license. See the complete license in the bundle
Credits
- Swagger for the UI
All versions of guzzle-bundle with dependencies
guzzle/guzzle Version 3.*
symfony/web-profiler-bundle Version ~2.1
symfony/http-foundation Version ~2.1
symfony/http-kernel Version ~2.1
symfony/config Version ~2.1
symfony/dependency-injection Version ~2.1