Guzzle

An extensible PHP HTTP client for sending requests and integrating with web services

Library
Composer
v8.3.0
23,444 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
94 /100 Excellent
Development Activity 96
Maintenance 96
Community 84
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
89 /100 Excellent
Architecture 90
Code Quality 92
Innovation 88
Learning Curve 85

Guzzle is a PHP HTTP client that makes it simple to send HTTP requests and trivial to integrate with web services. It offers one interface for both synchronous and asynchronous requests, builds on the PSR-7 message and PSR-18 client standards for interoperability, and abstracts away the underlying transport so your code never depends directly on cURL or PHP streams.

A composable middleware system lets you augment client behavior with retries, redirects, logging, and cookies, while promises make concurrent requests straightforward. With billions of downloads and near-universal adoption across the PHP ecosystem, Guzzle is the de facto standard HTTP client for the language.

What You Get

  • A simple, immutable Client for building and sending synchronous and asynchronous HTTP requests
  • Full PSR-7 (messages) and PSR-18 (HTTP client) compliance for framework and library interoperability
  • A pluggable handler and middleware stack for retries, redirects, cookies, and logging
  • Promise-based concurrency for pooling and multiplexing many requests at once
  • Transport abstraction over cURL and PHP streams so code stays environment-agnostic

Common Use Cases

  • Consuming REST and JSON APIs from PHP applications and services
  • Making concurrent or pooled requests to speed up bulk data fetching
  • Building SDKs and API clients that need retries, auth, and error handling
  • Streaming large uploads and downloads without exhausting memory

Under The Hood

Architecture - A request enters through the immutable Client (src/Client.php), which merges default options and delegates to a HandlerStack that wraps a base transport handler in a chain of middleware (redirects, retries, cookies, body preparation). The handler returns a PromiseInterface, so the same code path serves both blocking request() and non-blocking sendAsync() calls; Pool and multiplexing coordinate many in-flight promises. Handlers under src/Handler (CurlHandler, CurlMultiHandler, StreamHandler, MockHandler) isolate the actual transport behind a common callable contract.

Tech Stack - Pure PHP targeting ^7.2.5 || ^8.0, built on the guzzlehttp/promises and guzzlehttp/psr7 packages plus the psr/http-client interface, with symfony deprecation-contracts and polyfills. cURL is an optional runtime dependency (ext-curl) with a PHP-stream fallback. Tooling includes PHPUnit, PHPStan (with a baseline), and php-cs-fixer, orchestrated via a Makefile and composer bin plugin.

Code Quality - The codebase is small and focused (47 source files) with an extensive test suite (41 test files) covering handlers, middleware, and integration scenarios against a test server. Interfaces are defined for every major seam (ClientInterface, CurlFactoryInterface, MessageFormatterInterface), dedicated exception types model transfer and HTTP errors, and PHPStan enforces static typing. Naming is consistent and the public surface is documented inline.

API Design - The developer experience is deliberately minimal: construct a Client, call request('GET', $uri), and read a PSR-7 response. Request options are passed as a plain associative array, keeping the getting-started path to a couple of lines, while advanced needs (middleware, custom handlers, promises) are available without complicating the common case. Documentation is thorough, with a quickstart, request-options reference, and testing guide.

Used by 31 apps in this directory

TypeScript
74%
Apache 2.0

Fern

Developer Tools

3,822

Fern turns a single OpenAPI, AsyncAPI, or Protobuf definition into type-safe SDKs for nine languages and a hosted API documentation site, all from one CLI and one source of truth.

View details
90
Repo Health
86
Technical
66
Dependency
Built with
TypeScript 74%
Updated today
Vue
54%
GPL 3.0

Financial Freedom

Invoicing Finance

2,950

Own your financial data with a self-hosted, privacy-first budgeting app that replaces Mint and YNAB.

View details
60
Repo Health
67
Technical
71
Dependency
Built with
Vue 54%
PHP 44%
Updated 3 weeks ago
TypeScript
72%
AGPL 3.0

Firecrawl

AI Development · Developer Tools

194,745

Turn any website into clean, LLM-ready data with a single API call — no proxy headaches, no scraping complexity.

View details
89
Repo Health
83
Technical
65
Dependency
Built with
TypeScript 72%
Python 12%
Updated today
JavaScript
72%
AGPL 3.0

Fleetbase

Logistics

4,390

Modular open-source logistics and supply chain operating system

View details
93
Repo Health
75
Technical
68
Dependency
Built with
JavaScript 72%
Updated yesterday
PHP
91%
AGPL 3.0

FreeScout

Customer Support

4,611

Run your own help desk and shared inbox — a fully self-hosted, open-source alternative to Zendesk and Help Scout with no per-agent fees.

View details
92
Repo Health
55
Technical
63
Dependency
Built with
PHP 91%
Updated yesterday
PHP
57%
Other

Hi.Events

Ecommerce · Scheduling

4,074

Self-hosted event ticketing platform that keeps your attendee data, brand, and revenue completely under your control.

View details
90
Repo Health
84
Technical
67
Dependency
Built with
PHP 57%
TypeScript 37%
Updated today
PHP
84%
Other

Invoice Ninja

Invoicing Finance · Project Management

10,311

Self-hostable invoicing, time-tracking, and multi-gateway payment platform for freelancers and small businesses, with built-in e-invoicing compliance for EU and global standards.

View details
97
Repo Health
83
Technical
62
Dependency
Built with
PHP 84%
Updated 2 days ago
PHP
51%
MIT

Krayin CRM

CRM · Ecommerce

24,049

Free, open-source Laravel & Vue.js CRM for SMEs and enterprises to manage the complete customer lifecycle.

View details
90
Repo Health
68
Technical
67
Dependency
Built with
PHP 51%
Blade 41%
Updated 3 days ago
PHP
55%
AGPL 3.0

Leantime

Collaboration · Productivity · Project Management

11,890

Project management built for ADHD, autism, and dyslexia — simple as Trello, powerful as Jira

View details
90
Repo Health
68
Technical
62
Dependency
Built with
PHP 55%
CSS 18%
Blade 14%
Updated 3 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers