Download the PHP package prestashop/module-lib-guzzle-adapter without Composer

On this page you can find all versions of the php package prestashop/module-lib-guzzle-adapter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-lib-guzzle-adapter

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 Minimum PHP Version Quality Control Status

Installation

Version Guidance

Version Status Packagist - Namespace Repo Docs PHP Version
<=0.5 Stable prestashop/module-lib-guzzle-adapter Prestashop\ModuleLibGuzzleAdapter v0.x N/A >=7.2.5
>=0.6 Latest prestashop/module-lib-guzzle-adapter Prestashop\ModuleLibGuzzleAdapter v0.x N/A >=5.6.0
1.x Latest prestashop/module-lib-guzzle-adapter Prestashop\ModuleLibGuzzleAdapter v1.x N/A >=7.2.5

Usage

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 property Guzzle 7 property
base_url <=> base_url
defaults.authorization <=> authorization
defaults.exceptions <=> http_errors
defaults.timeout <=> timeout

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:

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

This library reuses the idea behind PHP-HTTP, where the implementation of HTTP requests should be the same (PSR) whatever the client chosen.

The client files from php-http/guzzle5-adapter and 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.


All versions of module-lib-guzzle-adapter with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
psr/http-message Version ^1.0
php-http/message Version ^1.7
php-http/httplug Version ~1.1
guzzlehttp/psr7 Version ~1.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package prestashop/module-lib-guzzle-adapter contains the following files

Loading the files please wait ....