php-http/guzzle6-adapter
PSR-7/PSR-18 compatible adapter that lets you use Guzzle 6 as an HTTPlug HTTP client. Provides a bridge for sending requests through Guzzle while working with php-http contracts, useful for libraries that depend on standardized HTTP interfaces.
php-http/guzzle6-adapter bridges Guzzle 6 (a standalone HTTP client) with PSR-7 (HTTP message interfaces) and PSR-18 (HTTP client interfaces). This is ideal for Laravel applications requiring PSR-compliant HTTP clients (e.g., for decoupling HTTP logic, testing, or integrating with libraries like php-http/client).Illuminate\Http\Client) is PSR-18 compliant (since Laravel 8+), but this adapter enables backward compatibility with Guzzle 6 in older Laravel versions (pre-8) or custom PSR-18 implementations.HttpClient). Requires strict version pinning in composer.json.guzzlehttp/guzzle:^7.0 + PSR-18 wrappers replace this entirely?php-http/client (for PSR-18 HTTP clients).php-http/message (for PSR-7 messages).php-http/mock-client.GuzzleHttp\Stream\StreamInterface).GuzzleHttp\Client instantiations with PSR-18 clients using this adapter.// Before (Guzzle 6)
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.example.com');
// After (PSR-18 via Adapter)
$client = new \Http\Adapter\Guzzle\Guzzle6Client();
$response = $client->sendRequest(new \Http\Message\Request('GET', 'https://api.example.com'));
HttpClient.php-http/mock-client).HttpClient, the adapter is unnecessary unless interfacing with Guzzle 6 code.composer.json, increasing attack surface.HttpClient. Limited community knowledge for troubleshooting.| Risk | Impact | Mitigation |
|---|---|---|
| Guzzle 6 vulnerability | Security breach (e.g., CVE in Guzzle 6) | Isolate usage; monitor for patches. |
| Adapter bugs | PSR-18 incompatibility | Test thoroughly; avoid critical paths. |
| Laravel version conflict | Guzzle 6 clashes with Laravel’s Guzzle 7 | Use replace in composer.json. |
| Deprecation pressure | Technical debt from EOL dependency | Plan migration to Guzzle 7+. |
php-http/mock-client).HttpClient or Guzzle 7+ directly.How can I help you explore Laravel packages today?