PHPackages                             plimpton/guzzle-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. plimpton/guzzle-bundle

ActiveSymfony-bundle[HTTP &amp; Networking](/categories/http)

plimpton/guzzle-bundle
======================

Integrates Guzzle into Symfony2, comes with WSSE Plugin for RESTful Interfaces

v5.3.0(9y ago)013MITPHPPHP &gt;=5.6

Since Dec 12Pushed 8y ago1 watchersCompare

[ Source](https://github.com/plimpton/GuzzleBundle)[ Packagist](https://packagist.org/packages/plimpton/guzzle-bundle)[ Docs](https://github.com/8p/GuzzleBundle)[ RSS](/packages/plimpton-guzzle-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (9)Versions (35)Used By (0)

**[Requirements](#requirements)** | **[Installation](#installation)** | **[Usage](#usage)** | **[Events](#events)** | **[Features](#features)** | **[Suggestions](#suggestions)** | **[Contributing](#contributing)** | **[License](#license)**

Symfony GuzzleBundle
====================

[](#symfony-guzzlebundle)

[![Total Downloads](https://camo.githubusercontent.com/f4416af448ed5f049387897f7d2caea765a2e4f4f31da1ddd0ffb07c3893279d/68747470733a2f2f706f7365722e707567782e6f72672f6569676874706f696e74732f67757a7a6c652d62756e646c652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/eightpoints/guzzle-bundle)[![Monthly Downloads](https://camo.githubusercontent.com/a92b0f30597f2cd410a347fa03e3ad83b658d14697e264233b329c9ce94777ac/68747470733a2f2f706f7365722e707567782e6f72672f6569676874706f696e74732f67757a7a6c652d62756e646c652f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/eightpoints/guzzle-bundle)[![Latest Stable Version](https://camo.githubusercontent.com/2cb929a66e88b0cdfb376740fd783269363cd63631f650ead8937bf33caf7332/68747470733a2f2f706f7365722e707567782e6f72672f6569676874706f696e74732f67757a7a6c652d62756e646c652f762f737461626c652e706e67)](https://packagist.org/packages/eightpoints/guzzle-bundle)[![Build Status](https://camo.githubusercontent.com/ca1b82409c0f0eb296ab4bc150a6312fd49228685cf7fa7dd790c26c31b8ec8b/68747470733a2f2f7472617669732d63692e6f72672f38702f47757a7a6c6542756e646c652e737667)](https://travis-ci.org/8p/GuzzleBundle)[![License](https://camo.githubusercontent.com/001d3defb7c466e181a4a6620c0fc2c57522ebb24bc5e312123c456566199789/68747470733a2f2f706f7365722e707567782e6f72672f6569676874706f696e74732f67757a7a6c652d62756e646c652f6c6963656e7365)](https://packagist.org/packages/eightpoints/guzzle-bundle)[![Dependency Status](https://camo.githubusercontent.com/6cc0466acb3b2dff29b2576f442c4670c4f587b1a9c80149020999f62fbe4d75/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3537633833313030393638643634303033393531366436322f62616467652e7376673f7374796c653d737175617265)](https://www.versioneye.com/user/projects/57c83100968d640039516d62)[![SensioLabsInsight](https://camo.githubusercontent.com/2125fb4aaa012a6c20b8430dd5c82bbfc70f8defd57613c8e6542130048a8314/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f33396136653130622d636532392d343466362d393763652d3434623266663233303432342f6d696e692e706e67)](https://insight.sensiolabs.com/projects/39a6e10b-ce29-44f6-97ce-44b2ff230424)

This bundle integrates [Guzzle 6.x](http://guzzlephp.org/) into Symfony. Guzzle is a PHP framework for building RESTful web service clients. It comes with a WSSE Auth Plugin that can be used optionally.

GuzzleBundle follows semantic versioning. Read more on [semver.org](http://semver.org/).

---

Requirements
------------

[](#requirements)

- PHP 5.6 or above
- Symfony 2.7 or above
- [Guzzle PHP Framework](http://guzzlephp.org/) (included by composer)
- [WSSE Auth Plugin](https://github.com/8p/guzzle-wsse-plugin) (included by composer)

---

Installation
------------

[](#installation)

To install this bundle, run the command below and you will get the latest version by [Packagist](https://packagist.org/packages/eightpoints/guzzle-bundle).

```
composer require plimpton/guzzle-bundle
```

To use the newest (maybe unstable) version please add following into your composer.json:

```
{
    "require": {
        "plimpton/guzzle-bundle": "dev-master"
    }
}
```

---

Usage
-----

[](#usage)

Load bundle in AppKernel.php:

```
new plimpton\Bundle\GuzzleBundle\GuzzleBundle()
```

Configuration in config.yml:

```
guzzle:
    # (de)activate logging/profiler; default: %kernel.debug%
    logging: true

    clients:
        api_payment:
            base_url: "http://api.domain.tld"

            # custom headers (@deprecated, will be removed in v6; new: "headers" in options (see below))
            headers:
                Accept: "application/json"

            # guzzle client options (full description here: https://guzzle.readthedocs.org/en/latest/request-options.html)
            # NOTE: "headers" option is not accepted here as it is provided as described above.
            options:
                auth:
                    - acme     # login
                    - pa55w0rd # password

                headers:
                    Accept: "application/json"

                timeout: 30

            # plugin settings
            plugin:
                wsse:
                    username:   "acme"
                    password:   "pa55w0rd"
                    created_at: "-10 seconds" # optional

        api_crm:
            base_url: "http://api.crm.tld"
            headers:
                Accept: "application/json"

        ...
```

All these settings are optional. If WSSE username is defined the WSSE plugin will be injected automatically.

Using services in controller (guzzle.client.**api\_crm** represents the client name of the yaml config and is an instance of GuzzleHttp\\Client):

```
/** @var \GuzzleHttp\Client $client */
$client   = $this->get('guzzle.client.api_crm');
$response = $client->get('/users');
```

---

Events
------

[](#events)

Handling events. Events are dispatched before and after the request to the remote host.

### Listening To Events

[](#listening-to-events)

```

```

Your event Listener, or Subscriber **MUST** implement GuzzleBundle\\Events\\GuzzleEventListenerInterface.
Events dispatched are guzzle\_bundle.pre\_transaction, guzzle\_bundle.post\_transaction.
The service on the tag, is so that if you have multiple REST endpoints you can define which service a particular listener is interested in.

---

Features
--------

[](#features)

### Symfony Debug Toolbar / Profiler

[](#symfony-debug-toolbar--profiler)

[![Debug Logs](/Resources/doc/img/debug_logs.png "Symfony Debug Toolbar - Guzzle Logs")](/Resources/doc/img/debug_logs.png)

---

Suggestions
-----------

[](#suggestions)

Adding aliases: If you want to use different names for provided services you can use aliases. This is a good idea if you don't want have any dependency to guzzle in your service name.

```
services:
   crm.client:
       alias: guzzle.client.api_crm
```

---

Contributing
------------

[](#contributing)

👍 If you would like to contribute to the project, please read the [CONTRIBUTING.md](CONTRIBUTING.md).

🎉 Thanks to the [contributors](https://github.com/8p/GuzzleBundle/graphs/contributors) who participated in this project.

---

License
-------

[](#license)

This bundle is released under the [MIT license](Resources/meta/LICENSE)

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor6

6 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Recently: every ~13 days

Total

33

Last Release

3428d ago

Major Versions

v3.0.1 → v4.0.02015-07-30

v4.5.1 → v5.0.02016-07-24

v4.5.2 → v5.0.32016-09-30

v4.6.0 → v5.1.02016-11-02

v5.3.0 → v6.x-dev2017-02-02

PHP version history (4 changes)v1.0.0PHP &gt;=5.3.3

v2.0.0PHP &gt;=5.4.0

v3.0.0PHP &gt;=5.5.0

v5.0.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/e7cd826ca1c2610316bd2c9a1c46c2fd6981fe8584d009f66a8b42e4ea77cb96?d=identicon)[plimpton](/maintainers/plimpton)

---

Top Contributors

[![soullivaneuh](https://avatars.githubusercontent.com/u/1698357?v=4)](https://github.com/soullivaneuh "soullivaneuh (3 commits)")[![rafaelgfirmino](https://avatars.githubusercontent.com/u/5332773?v=4)](https://github.com/rafaelgfirmino "rafaelgfirmino (2 commits)")[![jonny-no1](https://avatars.githubusercontent.com/u/282458?v=4)](https://github.com/jonny-no1 "jonny-no1 (1 commits)")[![marcj](https://avatars.githubusercontent.com/u/450980?v=4)](https://github.com/marcj "marcj (1 commits)")[![mathielen](https://avatars.githubusercontent.com/u/1571485?v=4)](https://github.com/mathielen "mathielen (1 commits)")[![MatthieuCutin](https://avatars.githubusercontent.com/u/12746178?v=4)](https://github.com/MatthieuCutin "MatthieuCutin (1 commits)")[![surikman](https://avatars.githubusercontent.com/u/7412310?v=4)](https://github.com/surikman "surikman (1 commits)")[![thomasjohansen](https://avatars.githubusercontent.com/u/4906479?v=4)](https://github.com/thomasjohansen "thomasjohansen (1 commits)")[![TNAJanssen](https://avatars.githubusercontent.com/u/2812277?v=4)](https://github.com/TNAJanssen "TNAJanssen (1 commits)")[![trongrg](https://avatars.githubusercontent.com/u/863798?v=4)](https://github.com/trongrg "trongrg (1 commits)")[![VarCI-bot](https://avatars.githubusercontent.com/u/17718013?v=4)](https://github.com/VarCI-bot "VarCI-bot (1 commits)")[![derrabus](https://avatars.githubusercontent.com/u/1506493?v=4)](https://github.com/derrabus "derrabus (1 commits)")[![wimme002](https://avatars.githubusercontent.com/u/975457?v=4)](https://github.com/wimme002 "wimme002 (1 commits)")[![DonCallisto](https://avatars.githubusercontent.com/u/7060632?v=4)](https://github.com/DonCallisto "DonCallisto (1 commits)")

---

Tags

clientsymfonybundlerestcurlhttp clientweb serviceGuzzle

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/plimpton-guzzle-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/plimpton-guzzle-bundle/health.svg)](https://phpackages.com/packages/plimpton-guzzle-bundle)
```

###  Alternatives

[eightpoints/guzzle-bundle

Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony. Comes with easy and powerful configuration options and optional plugins.

44512.4M57](/packages/eightpoints-guzzle-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19564.8M1.6k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M396](/packages/drupal-core-recommended)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M514](/packages/shopware-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
