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
Http Adapter Bundle

Http Adapter Bundle Laravel Package

petrepatrasc/http-adapter-bundle

A Symfony bundle offering an HTTP adapter abstraction, letting applications wrap or swap HTTP client implementations behind a shared interface. Useful for decoupling code from specific HTTP libraries, though the project is low-activity and sparsely documented.

View on GitHub
Deep Wiki
Context7

Issue HTTP requests for your Symfony2 project.

Frequently asked questions about Http Adapter Bundle
Is petrepatrasc/http-adapter-bundle compatible with Laravel?
No. It is a Symfony2 bundle built on Symfony's DependencyInjection component and bundle extension classes, which Laravel's kernel does not load. Composer constraints target legacy Symfony versions and will typically conflict with a modern Laravel and PHP runtime.
Can I install this Symfony bundle in a Laravel project via Composer?
Installation is not recommended and often fails because the package declares legacy symfony/symfony or symfony/framework-bundle ranges. Even if it installed, Laravel would not execute the bundle's container wiring, so you would get none of its intended value. Use Laravel's HTTP client or Guzzle instead.
What does petrepatrasc/http-adapter-bundle actually do?
It wraps HTTP client interactions behind a shared adapter interface so an application can swap curl, stream, socket, or Guzzle-style backends without rewriting business logic. In Symfony it wires those adapters through the service container. The portable idea is the adapter pattern, not the Symfony-specific integration.
Does it support Laravel 10 or Laravel 11?
No official support exists for Laravel 10, Laravel 11, or any Laravel version. The package targets end-of-life Symfony2 and has no Laravel service provider or facade integration. Treat any claim of Laravel compatibility as unverified.
How do I mock HTTP calls in tests with this package?
In Symfony the adapter layer can be mocked because business code depends on the interface rather than a concrete client. In Laravel, the idiomatic equivalent is Http::fake() with the framework's HTTP client, which requires no third-party bundle. If you need a domain boundary, define a narrow internal interface and fake that.
What are the best Laravel alternatives to this bundle?
Use Illuminate\Support\Facades\Http for everyday requests, retries, pools, and fakes. Use Guzzle handler stacks when you need middleware for logging or tracing, and add a small internal ApiClient interface where testability or swap-ability matters. Together these cover the same pattern natively.
Is this package maintained and safe for production?
It is low-activity with zero stars and no dependents, and documentation is sparse. It targets end-of-life Symfony2, so transitive dependencies are effectively unpatchable and PHP 8+ compatibility is unverified. The MIT license is permissive, but that does not provide maintenance or security guarantees.
Does it work with PHP 8 and modern Symfony?
Compatibility with PHP 8+ and modern Symfony is unverified and unlikely without changes. The declared Symfony2-era constraints are the first blocker during Composer resolution. Run a short compatibility spike only if a legacy Symfony2 application already uses it.
Can I swap HTTP backends at runtime with this package?
The bundle's design goal is to let you swap adapter implementations behind a common interface, usually through container configuration. In Laravel the equivalent is injecting a custom client interface or configuring Guzzle handlers, not importing a Symfony bundle. For most Laravel products, runtime backend swapping is unnecessary complexity.
I found this bundle in a legacy Symfony app — how do I migrate off it?
Treat it as containment: wrap each call site behind an internal interface, add characterization tests around the response contract, then replace the implementation with Guzzle or Symfony HttpClient. Remove the bundle alongside the next feature that touches that code path rather than as a standalone rewrite. Do not carry it into a new Laravel codebase.
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