docs/overview.md
allow_url_fopen must be enabled in your
system's php.ini.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 | php
You can add Guzzle as a dependency using Composer:
composer require guzzlehttp/guzzle:^8.0
Alternatively, you can specify Guzzle as a dependency in your project's existing composer.json file:
{
"require": {
"guzzlehttp/guzzle": "^8.0"
}
}
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.
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 install
Guzzle is unit tested with PHPUnit:
vendor/bin/phpunit
[!NOTE] You'll need Node.js
^20.19 || ^22.13 || >=24available asnodein order to perform integration tests on Guzzle's HTTP handlers.
If you discover a security vulnerability within this package, please send an email to [email protected]. 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.