# symfony/http-client-contracts

Generic abstractions related to HTTP clients

Repository: https://github.com/symfony/http-client-contracts
Canonical: https://ross.abutalabs.com/products/http-client-contracts
Homepage: https://symfony.com
Language: PHP
License: MIT
License Family: permissive
Topics: php, symfony, abstractions, contracts, decoupling, interfaces, interoperability, standards, symfony-contracts
Last push: 2026-08-04T09:45:01+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 78, longevity 100
- inputs: {"age_days": 2655, "days_push": 29, "days_rel": 67, "gap_med": 52, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1972, forks 0 (observed 2026-08-28T04:06:00.863316+00:00)

## What it is
A set of PHP interfaces and abstractions for HTTP clients, extracted from the Symfony components. It lets libraries depend on stable, battle-tested contracts rather than concrete HTTP client implementations.

## Use cases
- decouple my library from a specific http client implementation
- type-hint against a standard http client interface in php
- make my package interoperable with symfony http clients
- swap http clients without changing consuming code
- define a contract for http client implementations

## When to choose
- you are building a PHP library that needs to make HTTP requests without hard-coding a client
- you want interoperability with the Symfony ecosystem
- you need stable interfaces to mock in tests

## When to avoid
- you just need an actual HTTP client to send requests - use symfony/http-client or Guzzle instead
- your project does not use PHP

## Facets
- artifact type: library
- maturity: stable
- function: http-client, sdk, developer-tools
- domain: web-development, backend, apis, developer-tools
- platform: php, cross-platform
- tags: symfony-contracts, interfaces, abstractions, decoupling, interoperability

## Member repositories
- symfony/http-client-contracts (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:00.863316+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:05:03.311149+00:00, confidence not recorded.
  - readme: https://github.com/symfony/http-client-contracts (fetched 2026-08-28T04:06:00.863316+00:00, sha 9f1fea643629)
  - homepage: https://symfony.com (fetched 2026-08-29T10:44:31.036219+00:00, sha 68595089eb73)
  - site_page: https://symfony.com/doc (fetched 2026-08-29T10:44:31.039076+00:00, sha 44889134f4fb)
  - site_page: https://symfony.com/doc/current/contributing/community/releases.html (fetched 2026-08-29T10:44:31.040915+00:00, sha 8050a3fea9f9)
  - site_page: https://symfony.com/releases (fetched 2026-08-29T10:44:31.042869+00:00, sha 5bd749e2b676)
  - site_page: https://symfony.com/blog/category/releases (fetched 2026-08-29T10:44:31.044783+00:00, sha 5928e60cd226)
- Data as of 2026-08-30T08:39:29.467469+00:00.
