- PHP 7.4
- To use the PHP stream handler,
allow_url_fopenmust be enabled in your system's php.ini. - To use the cURL handler, you must have cURL >= 7.34.0 compiled with OpenSSL and zlib.
Support for HTTP/2 and HTTP/3 depends on the PHP cURL extension and the linked
runtime libcurl. HTTP/2 requires libcurl 7.65.2 or higher built with HTTP/2
support (nghttp2). HTTP/3 requires PHP to expose cURL's HTTP/3 constants,
libcurl 7.88.0 or higher, and runtime libcurl reporting the CURL_VERSION_HTTP3
feature. Many libcurl builds do not enable HTTP/3 unless an HTTP/3 backend is
selected at build time.
The recommended way to install Guzzle is with Composer. Composer is a dependency management tool for PHP that allows you to declare the dependencies your project needs and installs them into your project.
# Install Composer
curl -sS https://getcomposer.org/installer | phpYou can add Guzzle as a dependency using Composer:
composer require guzzlehttp/guzzle:^8.1Alternatively, you can specify Guzzle as a dependency in your project's existing composer.json file:
{
"require": {
"guzzlehttp/guzzle": "^8.1"
}
}After installing, you need to require Composer's autoloader:
require 'vendor/autoload.php';You can find out more on how to install Composer, configure autoloading, and other best-practices for defining dependencies at getcomposer.org.
The git repository contains an upgrade guide that details what changed between the major versions.
- Guzzle utilizes PSR-1, PSR-2, PSR-4, and PSR-7.
- Guzzle is meant to be lean and fast with very few dependencies. This means that not every feature request will be accepted.
- Guzzle has a minimum PHP version requirement of PHP 7.4. Pull requests must not require a PHP version greater than PHP 7.4 unless the feature is only utilized conditionally and the file can be parsed by PHP 7.4.
- All pull requests must include unit tests to ensure the change works as expected and to prevent regressions.
In order to contribute, you'll need to checkout the source from GitHub and install Guzzle's dependencies using Composer:
git clone https://github.com/guzzle/guzzle.git
cd guzzle && composer installGuzzle is unit tested with PHPUnit:
vendor/bin/phpunitNote
You'll need Node.js ^20.19 || ^22.13 || >=24 available as node in order to
perform integration tests on Guzzle's HTTP handlers.
If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see the Security Policy for more information.