Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Guzzle5 Adapter Laravel Package

php-http/guzzle5-adapter

PHP-HTTP adapter that lets you use Guzzle 5 as the underlying HTTP client. It implements the PHP-HTTP client interfaces for sending requests and handling responses, making it useful for legacy projects already built on Guzzle 5.

Deep Wiki
Context7

Technical Evaluation

Recommendation: Treat php-http/guzzle5-adapter as a transitional compatibility shim only. Do not adopt it for new Laravel packages or greenfield services. Its only defensible use case is a legacy Laravel/PHP application already locked to Guzzle 5 that must consume a library requiring the HTTPlug Http\Client\HttpClient contract.

Architecture fit: Poor for modern Laravel. Laravel’s HTTP client is built on Guzzle 7 and the ecosystem has moved to PSR-18/PSR-17. This adapter targets HTTPlug, the predecessor to PSR-18, and bridges to Guzzle 5, which is end-of-life. It fits only as an anti-corruption layer between a legacy Guzzle 5 transport and modern HTTPlug-dependent libraries. It should not appear in a package’s public API or be a hard dependency of a distributed Laravel package; the consuming application should choose the implementation.

Integration feasibility: Composer installation is mechanically feasible, but practical feasibility is constrained by Guzzle 5 and PHP-version compatibility. Expect dependency conflicts with modern Laravel, Guzzle 6/7, PSR-18 libraries, and packages requiring current PHP. There is no Laravel service-provider integration, so the team must wire the adapter into the container and isolate it behind an internal HTTP interface. Contract and regression tests are mandatory because PSR-7/Guzzle 5 conversion behavior is not guaranteed across streaming, headers, redirects, cookies, timeouts, and exception mapping.

Technical risk: High.

  • Lifecycle risk: Archived, last release 2019, no maintainer response path, no CVE remediation.
  • Supply-chain risk: Repository is listed as unknown; source provenance, CI, issue history, and release integrity cannot be readily verified.
  • Adoption risk: 10 stars and a 0.16 score indicate minimal community validation.
  • Runtime risk: Guzzle 5 is EOL and may be incompatible with supported PHP/Laravel versions or modern TLS/proxy requirements.
  • Behavioral risk: PSR-7-to-Guzzle 5 conversion can leak differences in stream handling, header normalization, redirect behavior, and exception semantics.
  • Strategic risk: Extends the life of a legacy transport instead of reducing exit cost.

Key questions:

  • Which concrete dependency requires php-http/client-implementation, and can it be replaced with a PSR-18 client?
  • Is Guzzle 5 genuinely unavoidable, or is it only transitive debt?
  • Which Laravel and PHP versions must be supported, and does Guzzle 5 run safely there?
  • Who owns the fork/security patching if the adapter must remain?
  • Are streaming, async, redirects, proxies, TLS, cookies, and file uploads in scope?
  • Can the adapter be isolated behind an internal interface with contract tests and a documented exit plan?
  • What is the cost of migrating the legacy consumer directly to Guzzle 7/PSR-18 versus maintaining this shim?

Integration Approach

Stack fit: Low. Modern Laravel packages should depend on psr/http-client and use PSR-18/PSR-17 discovery. This adapter should be required only by the legacy application, not by a reusable Laravel package. If a package currently type-hints HTTPlug, refactor toward PSR-18 first; use this adapter only as a temporary application-level bridge.

Migration path:

  1. Inventory Composer dependencies for guzzlehttp/guzzle:^5, php-http/client-implementation, HTTPlug consumers, and any existing HTTP abstractions.
  2. Apply a decision gate: if the dependency can move to PSR-18/Guzzle 7/Symfony HttpClient, skip this adapter entirely.
  3. If Guzzle 5 is unavoidable, isolate HTTP calls behind an internal interface owned by the application.
  4. Bind Http\Client\HttpClient to the adapter in a service provider, keeping Guzzle 5 construction and adapter configuration out of domain code.
  5. Pin the adapter and Guzzle 5 versions in the lockfile; add Composer conflicts to prevent accidental Guzzle 6/7 mixing.
  6. Add contract tests for request conversion, response conversion, headers, streams, errors, redirects, timeouts, and TLS/proxy behavior.
  7. Migrate consumers incrementally to a PSR-18 client, then remove the adapter and Guzzle 5.

Compatibility: Expect friction with Laravel 7+ HTTP client usage because Laravel’s Http facade does not consume HTTPlug adapters directly. Calls must go through the application’s bound HTTPlug client. Do not assume compatibility with current PHP 8.x releases without verification. MIT licensing is acceptable, but archived status and unknown repository provenance require internal review.

Sequencing: Start with dependency and risk discovery, not installation. Prototype in a disposable branch or spike environment. If the spike passes, integrate behind an interface with tests and an owner. Schedule the exit migration before broad rollout; do not let the adapter enter shared package dependencies or long-lived platform contracts.

Operational Impact

Maintenance: High burden relative to value. The package is archived, so the organization must own patching, compatibility fixes, and vulnerability response. Plan for a maintained fork or vendor patch set if usage extends beyond a short migration window. Add it to the software-composition analysis exception register with an expiry date.

Support: Low external support. There is no active upstream maintainer, no guaranteed issue triage, and limited documentation. Internal runbooks must cover adapter configuration, Guzzle 5 transport settings, error mapping, and rollback. Teams should know that failures may require debugging both HTTPlug/PSR-7 and Guzzle 5 semantics.

Scaling: The adapter itself is unlikely to be the primary bottleneck, but Guzzle 5’s blocking request model and older connection handling limit high-throughput or async workloads. It is unsuitable for new high-scale services. For batch jobs, set explicit timeouts, concurrency limits, and memory controls; test large payloads and streamed responses.

Failure modes: Expect conversion defects around streamed bodies, header casing/duplication, redirects, cookies, multipart uploads, exception translation, timeout handling, TLS/proxy changes, and PHP deprecation warnings. Dependency conflicts can break builds. Archived dependencies can fail security audits. Monitor adapter-specific exceptions, HTTP error-rate changes, latency, memory, and Composer audit findings.

Ramp-up: The API surface is small, so initial developer ramp-up is moderate. The harder cost is legacy context: engineers must understand Guzzle 5, HTTPlug, PSR-7 conversion behavior, and the application’s historical HTTP assumptions. Provide an architecture decision record, a short integration guide, contract tests, and a named owner. Keep the exit plan visible: this package buys migration time, not a stable long-term platform capability.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource