Skip to content

campru/guzzle-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guzzle Bundle Build Status Latest Stable Version

Provide an advanced profiler for Guzzle. This profiler is for debug purposes and will display a dedicated report available in the toolbar and Silex Web Profiler

Guzzle Symfony web profiler panel

Guzzle Symfony web profiler panel - request details

Guzzle Symfony web profiler panel - response details

Installation

Add the composer requirements

{
    "require": {
        "campru/guzzle-bundle": "1.0.0"
    },
}

Enable it in your application

use Campru\GuzzleBundle\Provider\GuzzleProfilerServiceProvider;

$app->register(new GuzzleProfilerServiceProvider());

The provider depends on WebProfilerServiceProvider, so you also need to enable this if that's not already the case

use Silex\Provider\WebProfilerServiceProvider;

$app->register(new Provider\WebProfilerServiceProvider())

Finally, it's needed to add two subscribers to Guzzle client when this is created

use GuzzleHttp\Client;

$client = new Client(['base_url' => 'http://my.api.com']);

$client->getEmitter()->attach($app['guzzle_bundle.subscriber.profiler']);
$client->getEmitter()->attach($app['guzzle_bundle.subscriber.storage']);

Licence

This bundle is under the MIT license. See the complete license in the bundle