docs/overview.md
allow_url_fopen must be enabled in your system's php.ini.[!NOTE] Guzzle no longer requires cURL in order to send HTTP requests. Guzzle will use the PHP stream wrapper to send HTTP requests if cURL is not installed. Alternatively, you can provide your own HTTP handler used to send requests. Keep in mind that cURL is still required for sending concurrent requests.
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:^7.0
Alternatively, you can specify Guzzle as a dependency in your project's existing composer.json file:
{
"require": {
"guzzlehttp/guzzle": "^7.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.