symfony/http-client
Symfony HttpClient provides powerful methods to fetch HTTP resources synchronously or asynchronously, with a clean API for building requests, handling responses, streaming, and testing HTTP calls in PHP applications.
curl_* wrapper or a bespoke retry loop is spending roadmap capacity on undifferentiated, security-sensitive plumbing.RetryableHttpClient (third-party API flakiness → SLA and support-ticket reduction), ScopingHttpClient (per-tenant base URIs and credentials for multi-tenant SaaS), CachingHttpClient (RFC 9111-compliant caching → latency and egress cost reduction), NoPrivateNetworkHttpClient (SSRF defense for any user-supplied URL feature), and AsyncResponse/stream() (parallel enrichment for dashboards and search).Psr18Client, HttplugClient) plus a GuzzleHttpHandler bridge mean the choice is reversible and doesn't lock the org into a single HTTP stack — relevant when deciding whether Laravel's Http facade (Guzzle-backed) remains the house standard.MockHttpClient and the copy-as-curl/debug tooling raise the ceiling on integration-test coverage for external dependencies, which is usually where PM-visible regressions ("checkout fails when the payments API is slow") originate.NoPrivateNetworkHttpClient) and a cross-authority redirect credential-leak fix. That is a signal to set an explicit patch-SLA and advisory-monitoring policy for outbound HTTP rather than letting transitive versions drift.Adopt when:
ScopingHttpClient).Look elsewhere, or pause, when:
Http facade. Running Guzzle and this component means two transports, two mocking idioms, and two sets of timeout semantics. Adopt only with an explicit migration or a deliberate "new code only" boundary; a split-brain HTTP stack is a real maintenance tax.GuzzleHttpHandler bridge helps, but SDK compatibility must be verified case by case.symfony/symfony (issues and PRs live in the monorepo), which explains the reported 0 dependents and modest star count. Real adoption is ecosystem-wide and flows through the monorepo. Treat the star/dependent numbers as not a demand signal either way; weigh the Symfony release policy, LTS lines (5.4/6.4), and the steady bugfix backports in the changelog instead.For executives: Outbound HTTP is the connective tissue of our integrations, and it's also where outages and security incidents hide. This component replaces hand-rolled request code with a mature, MIT-licensed library that already handles retries, timeouts, proxies, redirects, HTTP/2–3, caching, and SSRF protection — maintained by the Symfony project with backports to long-term-support branches and a recent CVE fix shipped as a patch. Buying (adopting) this means faster delivery of integration features, fewer bespoke bugs, and a smaller security surface, at zero license cost. The main cost is engineering discipline — one transport standard, version pinning, and advisory monitoring — not procurement.
For engineering: Composable clients let you layer exactly what each integration needs: RetryableHttpClient for flaky partners, ScopingHttpClient for per-tenant credentials, CachingHttpClient for RFC 9111 cache behavior, NoPrivateNetworkHttpClient for user-supplied URLs. Async responses give concurrency without a queue. PSR-18/PSR-17 adapters and the Guzzle handler keep us portable. Two cautions: (1) this is a split repo of symfony/symfony — track issues and security advisories upstream, not here; (2) if we stay on Laravel's Http facade, declare a hard boundary so we don't end up maintaining two HTTP stacks. Pin to an LTS line, subscribe to Symfony security announcements, and set a patch window (e.g., 7 days for security releases).
Decision requested: approve adopting this as the standard outbound HTTP client for new integration code, conditional on (a) an LTS version pin, (b) a documented coexistence rule with the existing HTTP layer, and (c) a named owner for security-advisory monitoring.
How can I help you explore Laravel packages today?