thecodingmachine / guzzle-universal-service-provider
Cross-framework module for guzzlehttp/guzzle:6
Requires
- php: >=7.0
- container-interop/service-provider: ^0.3
- guzzlehttp/guzzle: ^6.0
- php-http/guzzle6-adapter: ^1.1
- thecodingmachine/common-factories: ^0.3
Requires (Dev)
- puli/cli: ^1.0
- puli/composer-plugin: ^1.0
This package is auto-updated.
Last update: 2025-03-07 00:54:27 UTC
README
Guzzle6 universal module
This package integrates Guzzle6 in any container-interop compatible framework/container.
Installation
composer require thecodingmachine/guzzle-universal-service-provider
Once installed, you need to register the TheCodingMachine\Guzzle\XXXServiceProvider
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.
In addition to creating services for Guzzle 6, this service provider will also create a Guzzle 6 adapter for 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