This bundle integrates Guzzle >=4.0 in Symfony. Currently, it supports the following features:
- Integration with Symfony's debug tools (web debug toolbar, profiler, logger, timeline, ...)
- Configuring a Guzzle client simply using configuration
- Service descriptions to describe your services is json format
Add the required package using composer.
composer require csa/guzzle-bundle:@stable
Add the bundle to your AppKernel.
<?php
// in %kernel.root_dir%/AppKernel.php
$bundles[] = new Csa\Bundle\GuzzleBundle\CsaGuzzleBundle();
To enable the data collector (only in the dev
environment, you may simply
configure the CsaGuzzleBundle as follows:
csa_guzzle:
profiler: %kernel.debug%
You may also enable the included logger, in order log outcoming requests:
csa_guzzle:
logger: true
Although I try to guarantee forward-compatibility of the bundle with previous versions. Here are the upgrade notes between each version.
See Upgrade.md.
- Creating clients
- Registering new event subscribers
- Available event subscribers
- Configuration reference
- Streaming a guzzle response
- Service descriptions
This library is under the MIT license. For the full copyright and license information, please view the LICENSE file that was distributed with this source code.