PHPackages                             prestashop/module-lib-guzzle-adapter - 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. prestashop/module-lib-guzzle-adapter

ActiveLibrary[HTTP &amp; Networking](/categories/http)

prestashop/module-lib-guzzle-adapter
====================================

Plug modules to the Guzzle client available on a running shop

v1.0(3y ago)378.9k↓66.5%42AFL-3.0PHPPHP ^7.2.5 || ^8.0CI failing

Since Jun 10Pushed 3y ago3 watchersCompare

[ Source](https://github.com/PrestaShopCorp/module-lib-guzzle-adapter)[ Packagist](https://packagist.org/packages/prestashop/module-lib-guzzle-adapter)[ RSS](/packages/prestashop-module-lib-guzzle-adapter/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (8)Dependencies (8)Versions (10)Used By (2)

PrestaShop module library for Guzzle clients
============================================

[](#prestashop-module-library-for-guzzle-clients)

Plug modules to the Guzzle client available on a running shop. This library is compatible with PHP 7.2.5 and above.

[![Latest Stable Version](https://camo.githubusercontent.com/7cde900d2395844e4f63f133679c67768fac145d07f68a5cbf9f754596c5f51e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70726573746173686f702f6d6f64756c652d6c69622d67757a7a6c652d616461707465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/prestashop/module-lib-guzzle-adapter) [![Minimum PHP Version](https://camo.githubusercontent.com/c308bc60fd70a2672917b5d79fdc6bd664c9bb7e40980cf6cffc93dabd681728/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e322e352d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/) [![Quality Control Status](https://camo.githubusercontent.com/f2229bf469ede7e88c7e79b9578ee6a3c081cf1cbc477d6e1773dd7cc115e4e2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f70726573746173686f70636f72702f6d6f64756c652d6c69622d67757a7a6c652d616461707465722f50485025323074657374733f7374796c653d666c61742d737175617265)](https://github.com/PrestaShopCorp/module-lib-guzzle-adapter/actions/workflows/php.yml)

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

[](#installation)

```
composer require prestashop/module-lib-guzzle-adapter

```

Version Guidance
----------------

[](#version-guidance)

VersionStatusPackagist -NamespaceRepoDocsPHP Version&lt;=0.5Stable`prestashop/module-lib-guzzle-adapter``Prestashop\ModuleLibGuzzleAdapter`[v0.x](https://github.com/PrestaShopCorp/module-lib-guzzle-adapter/tree/main)N/A&gt;=7.2.5&gt;=0.6Latest`prestashop/module-lib-guzzle-adapter``Prestashop\ModuleLibGuzzleAdapter`[v0.x](https://github.com/PrestaShopCorp/module-lib-guzzle-adapter/tree/0.x)N/A&gt;=5.6.01.xLatest`prestashop/module-lib-guzzle-adapter``Prestashop\ModuleLibGuzzleAdapter`[v1.x](https://github.com/PrestaShopCorp/module-lib-guzzle-adapter/tree/main)N/A&gt;=7.2.5Usage
-----

[](#usage)

```
# Getting a client (Psr\Http\Client\ClientInterface)
$options = ['base_url' => 'http://some-url/'];
$client = (new Prestashop\ModuleLibGuzzleAdapter\ClientFactory())->getClient($options);

# Sending requests and receive response (Psr\Http\Message\ResponseInterface)
$response = $this->client->sendRequest(
    new GuzzleHttp\Psr7\Request('POST', 'some-uri')
);
```

In this example, `base_url` is known to be a option for Guzzle 5 that has been replaced for `base_uri` on Guzzle 6+. Any of this two keys can be set, as it will be automatically modified for the other client if needed.

The automatically changed properties are:

Guzzle 5 propertyGuzzle 7 propertybase\_url&lt;=&gt;base\_urldefaults.authorization&lt;=&gt;authorizationdefaults.exceptions&lt;=&gt;http\_errorsdefaults.timeout&lt;=&gt;timeoutWhy this library?
-----------------

[](#why-this-library)

Making HTTP requests in a PrestaShop module can be done in several ways. With `file_get_contents()`, cURL or Guzzle when provided by the core.

Depending on the running version of PrestaShop, the bundled version of Guzzle can be different:

- PrestaShop 1.7: Guzzle 5
- PrestaShop 8: Guzzle 7

Having a module compatible for these two major PrestaShop versions can be tricky. The classes provided by the two Guzzle version are named the same, but their methods are different.

It is not possible for a module contributor to require its own Guzzle dependency either, because PHP cannot load different versions of a same class and he would never know which one would be loaded first.

Implementation notes
--------------------

[](#implementation-notes)

This library reuses the idea behind [PHP-HTTP](https://docs.php-http.org), where the implementation of HTTP requests should be the same (PSR) whatever the client chosen.

The client files from [php-http/guzzle5-adapter](https://github.com/php-http/guzzle5-adapter) and [php-http/guzzle7-adapter](https://github.com/php-http/guzzle7-adapter) have been copied in this repository because these libraries both require a different version Guzzle in their dependencies to work. Requiring them together would conflict, so we duplicated the client adapters to be safe.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.3% of commits — single point of failure

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 ~27 days

Recently: every ~51 days

Total

9

Last Release

1269d ago

Major Versions

v0.5 → v1.02022-09-30

PHP version history (3 changes)v0.1PHP ^7.2 || ^8.0

v1.0PHP ^7.2.5 || ^8.0

v0.6PHP &gt;=5.6.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15106407?v=4)[Jarvis](/maintainers/ps-jarvis)[@ps-jarvis](https://github.com/ps-jarvis)

---

Top Contributors

[![Quetzacoalt91](https://avatars.githubusercontent.com/u/6768917?v=4)](https://github.com/Quetzacoalt91 "Quetzacoalt91 (28 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![jmcollin](https://avatars.githubusercontent.com/u/3930246?v=4)](https://github.com/jmcollin "jmcollin (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/prestashop-module-lib-guzzle-adapter/health.svg)

```
[![Health](https://phpackages.com/badges/prestashop-module-lib-guzzle-adapter/health.svg)](https://phpackages.com/packages/prestashop-module-lib-guzzle-adapter)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3856.2M31](/packages/gotenberg-gotenberg-php)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

185702.8k44](/packages/laudis-neo4j-php-client)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)

PHPackages © 2026

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