https://github.com/thecodingmachine/guzzle-universal-service-provider
Cross-framework module for guzzlehttp/guzzle:6
https://github.com/thecodingmachine/guzzle-universal-service-provider
Last synced: 3 months ago
JSON representation
Cross-framework module for guzzlehttp/guzzle:6
- Host: GitHub
- URL: https://github.com/thecodingmachine/guzzle-universal-service-provider
- Owner: thecodingmachine
- Created: 2016-10-21T10:08:18.000Z (over 9 years ago)
- Default Branch: 1.0
- Last Pushed: 2017-09-22T12:46:05.000Z (over 8 years ago)
- Last Synced: 2025-02-16T12:30:27.118Z (over 1 year ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 0
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://packagist.org/packages/thecodingmachine/guzzle-universal-service-provider)
[](https://packagist.org/packages/thecodingmachine/guzzle-universal-service-provider)
[](https://packagist.org/packages/thecodingmachine/guzzle-universal-service-provider)
# Guzzle6 universal module
This package integrates Guzzle6 in any [container-interop](https://github.com/container-interop/service-provider) compatible framework/container.
## Installation
```
composer require thecodingmachine/guzzle-universal-service-provider
```
Once installed, you need to register the [`TheCodingMachine\Guzzle\XXXServiceProvider`](src/XXXServiceProvider.php) into your container.
If your container supports Puli integration, you have nothing to do. Otherwise, refer to your framework or container's documentation to learn how to register *service providers*.
## Introduction
This is a service provider for [Guzzle 6](http://docs.guzzlephp.org/en/latest/index.html).
In addition to creating services for Guzzle 6, this service provider will also create a [Guzzle 6 adapter for HTTPlug](https://github.com/php-http/httplug).
## Expected values / services
This *service provider* expects the following configuration / services to be available:
| Name | Compulsory | Description |
|-----------------------------|------------|----------------------------------------|
| `guzzleConfig` | *no* | You can change the default provided Guzzle config by override this entry |
## Provided services
This *service provider* provides the following services:
| Service name | Description |
|-----------------------------|--------------------------------------|
| `GuzzleHttp\Client` | The Guzzle client |
| `guzzleConfig` | By default, the Guzzle config defaults to: `[ 'http_errors' => true ]` |
| `Http\Adapter\Guzzle6\Client` | An HTTPlug adapter for the Guzzle client |
| `Http\Client\HttpClient` | An alias to the Guzzle6 adapter |
| `Http\Client\HttpAsyncClient` | An alias to the Guzzle6 adapter |
## Extended services
*None*
Project template courtesy of thecodingmachine/service-provider-template