Back to Guzzle

Package Ecosystem

docs/package-ecosystem.md

8.0.03.2 KB
Original Source

Package Ecosystem

This page helps you choose between guzzlehttp/guzzle and related packages maintained by the Guzzle organization. Start with guzzlehttp/guzzle if you want to send HTTP requests; install another package directly only when your application needs that package's lower-level or specialized behavior.

Core HTTP Client Stack

PackageUse it forDocumentation
guzzlehttp/guzzleSending synchronous and asynchronous HTTP requests.Quick Start
guzzlehttp/psr7Creating and manipulating PSR-7 requests, responses, streams, and URIs.PSR-7 docs
guzzlehttp/promisesWorking directly with promises returned by asynchronous operations.Promises docs

Install guzzlehttp/guzzle for normal application HTTP work. It already depends on guzzlehttp/psr7 and guzzlehttp/promises, so you do not need to install them separately unless your application uses them directly.

Use guzzlehttp/psr7 directly when you need message, stream, or URI objects without sending requests. Use guzzlehttp/promises directly when you need promise composition outside of Guzzle's HTTP client APIs.

Service Client Packages

PackageUse it forDocumentation
guzzlehttp/commandBuilding command-based SDK-style clients with named operations and results.Command docs
guzzlehttp/guzzle-servicesBuilding service-description-driven clients on top of Guzzle Command.Guzzle Services docs

Use guzzlehttp/command when you want a higher-level client API where application code calls operations rather than manually building HTTP requests. Use guzzlehttp/guzzle-services when those operations should be described by service description arrays that define request serialization and response models.

Utilities and Add-Ons

PackageUse it forDocumentation
guzzlehttp/uri-templateExpanding RFC 6570 URI templates.URI Template docs
guzzlehttp/oauth-subscriberSigning Guzzle requests with OAuth 1.0 middleware.OAuth Subscriber docs
guzzlehttp/test-serverTesting HTTP clients against a local controllable server.Test Server docs

Use guzzlehttp/uri-template when an API provides URI templates that need to be expanded before sending requests. Use guzzlehttp/oauth-subscriber only for OAuth 1.0 request signing; OAuth 2.0 bearer tokens usually only need an Authorization header. Use guzzlehttp/test-server as a development dependency for integration tests, not as production infrastructure.