No description, website, or topics provided.
Pull request Compare This branch is 1 commit ahead, 15 commits behind sensiolabs:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This bundle provides a simple integration of the "Buzz library" from Kris Wallsmith into Symfony2. Buzz is a lightweight PHP 5.3 library for issuing HTTP requests. You can find more information about Buzz on its dedicated page at


$buzz = $this->container->get('buzz');

The bundle provides a new buzz service that returns an instance of Buzz\Browser.


To install this bundle, you'll need both the Buzz library and this bundle. Installation depends on how your project is setup:

Step 1: Installation using the bin/vendors.php method

If you're using the bin/vendors.php method to manage your vendor libraries, add the following entries to the deps file at the root of your project file:



Next, update your vendors by running:

$ ./bin/vendors install

Great! Now skip down to Step 2.

Step 1 (alternative): Installation with submodules

If you're managing your vendor libraries with submodules, simply add the two following submodules:

$ git submodule add git:// vendor/buzz
$ git submodule add git:// vendor/bundles/Sensio/Bundle/BuzzBundle

Finally update your submodules:

$ git submodule init
$ git submodule update

Step2: Configure the autoloader

Add the following entries to your autoloader:

// app/autoload.php

    // ...

    'Buzz'          => __DIR__.'/../vendor/buzz/lib',
    'Sensio'        => __DIR__.'/../vendor/bundles',

Step3: Enable the bundle

Finally, enable the bundle in the kernel:

// app/AppKernel.php

public function registerBundles()
    $bundles = array(
        // ...

        new Sensio\Bundle\BuzzBundle\SensioBuzzBundle(),

Congratulations! You're ready to use Buzz into Symfony2!

Basic Usage

The only thing to do is to request the buzz service from the container to get an instance of Buzz\Browser and start issuing HTTP requests:


$buzz = $this->container->get('buzz');

$response = $buzz->get('');

echo $response->getContent();


By default, this bundle configures Buzz to perform HTTP requests with the cURL extension. You must check that the cURL PHP extension is correctly installed on your platform:

$ php -i | grep curl