2017 © Pedro Peláez
 

symfony-bundle guzzle-bundle

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

image

plimpton/guzzle-bundle

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

  • Friday, July 14, 2017
  • by plimpton
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 52 Forks
  • 0 Open issues
  • 35 Versions
  • 0 % Grown

The README.md

Requirements | Installation | Usage | Events | Features | Suggestions | Contributing | License, (*1)

Symfony GuzzleBundle

Total Downloads Monthly Downloads Latest Stable Version Build Status License Dependency Status SensioLabsInsight, (*2)

This bundle integrates Guzzle 6.x 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., (*3)

GuzzleBundle follows semantic versioning. Read more on semver.org., (*4)


Requirements


Installation

To install this bundle, run the command below and you will get the latest version by Packagist., (*5)

``` bash composer require plimpton/guzzle-bundle, (*6)


To use the newest (maybe unstable) version please add following into your composer.json: ``` json { "require": { "plimpton/guzzle-bundle": "dev-master" } }

Usage

Load bundle in AppKernel.php: ``` php new plimpton\Bundle\GuzzleBundle\GuzzleBundle(), (*7)


Configuration in config.yml: ``` yaml 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., (*8)

Using services in controller (guzzle.client.api_crm represents the client name of the yaml config and is an instance of GuzzleHttp\Client): ``` php /** @var \GuzzleHttp\Client $client */ $client = $this->get('guzzle.client.api_crm'); $response = $client->get('/users');, (*9)


---- ## Events Handling events. Events are dispatched before and after the request to the remote host. ### Listening To Events ```xml <service id="listenerID" class="Your\ListenerClass\That\Implements\GuzzleEventListenerInterface"> <tag name="kernel.event_listener" event="guzzle_bundle.pre_transaction" method="onPreTransaction" service="servicename"/> </service>

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., (*10)


Features

Symfony Debug Toolbar / Profiler

Debug Logs, (*11)


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. yaml services: crm.client: alias: guzzle.client.api_crm, (*12)


Contributing

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

🎉 Thanks to the [contributors][5] who participated in this project., (*14)


License

This bundle is released under the MIT license, (*15)

The Versions

05/05 2017

dev-php5_deprecate

dev-php5_deprecate https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

The Development Requires

curl rest bundle symfony client guzzle web service http client

02/02 2017

v6.x-dev

6.9999999.9999999.9999999-dev https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

The Development Requires

curl rest bundle symfony client guzzle web service http client

30/09 2016

v4.x-dev

4.9999999.9999999.9999999-dev https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

The Development Requires

curl rest bundle symfony client guzzle web service http client

08/12 2015

v4.4.0

4.4.0.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

The Development Requires

curl rest bundle symfony client guzzle web service http client

17/10 2015

v4.3.0

4.3.0.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

The Development Requires

curl rest bundle symfony client guzzle web service http client

24/09 2015

v4.2.1

4.2.1.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

The Development Requires

curl rest bundle symfony client guzzle web service http client

22/09 2015

v4.2.0

4.2.0.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

The Development Requires

curl rest bundle symfony client guzzle web service http client

01/09 2015

v4.1.1

4.1.1.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

The Development Requires

curl rest bundle symfony client guzzle web service http client

09/08 2015

v4.1.0

4.1.0.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

The Development Requires

curl rest bundle symfony client guzzle web service http client

03/08 2015

v4.0.1

4.0.1.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

curl rest bundle symfony client guzzle web service http client

30/07 2015

v4.0.0

4.0.0.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

curl rest bundle symfony client guzzle web service http client

14/06 2015

v3.0.1

3.0.1.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

curl rest bundle symfony client guzzle web service http client

14/06 2015

v3.0.0

3.0.0.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

curl rest bundle symfony client guzzle web service http client

20/05 2015

v2.1.2

2.1.2.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

curl rest bundle symfony client guzzle web service http client

18/05 2015

v2.1.1

2.1.1.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

curl rest bundle symfony client guzzle web service http client

29/11 2014

v2.1.0

2.1.0.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

The Development Requires

curl rest bundle symfony client guzzle web service http client

09/11 2014

v2.0.0

2.0.0.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

curl rest bundle symfony client guzzle web service http client

12/12 2013

v1.0.0

1.0.0.0 https://github.com/8p/GuzzleBundle

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

  Sources   Download

MIT

The Requires

 

curl rest bundle symfony client guzzle web service http client