# symfony/http-foundation

Defines an object-oriented layer for the HTTP specification

Repository: https://github.com/symfony/http-foundation
Canonical: https://ross.abutalabs.com/products/http-foundation
Homepage: https://symfony.com/http-foundation
Language: PHP
License: MIT
License Family: permissive
Topics: php, symfony, component, symfony-component
Last push: 2026-08-25T14:37:39+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 87, longevity 100
- inputs: {"age_days": 5671, "days_push": 8, "days_rel": 11, "gap_med": 0, "n_releases_24m": 88}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8625, forks 306 (observed 2026-08-28T04:10:23.904891+00:00)

## What it is
A Symfony component that defines an object-oriented layer for the HTTP specification, replacing PHP's global variables and functions with Request and Response objects. It is one of the most widely adopted PHP libraries, used by Laravel, Drupal, Joomla, and many other projects.

## Use cases
- handle HTTP requests and responses in a PHP application without a full framework
- access request data like query params, POST bodies, cookies, and files in an object-oriented way
- manage sessions and cookies in PHP
- build a custom micro-framework or API on top of Request/Response objects
- send JSON or streaming responses and server-sent events
- inspect and manipulate HTTP headers and Accept-* negotiation

## When to choose
- you are building a PHP web application or framework and want a battle-tested HTTP abstraction
- you want to avoid dealing with PHP superglobals directly
- you are using Symfony or a framework built on Symfony components
- you need session, cookie, file upload, or header handling with a stable, well-documented API

## When to avoid
- you are not working in PHP
- you want a full-stack framework with routing, templating, and DI out of the box (use Symfony full framework instead)
- you need an async or non-blocking HTTP server

## Facets
- artifact type: library
- maturity: stable
- function: http-server, middleware, file-upload
- domain: web-development, backend, apis
- platform: php
- tags: http-request, http-response, symfony-component, sessions, headers, session

## Member repositories
- symfony/http-foundation (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:23.904891+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-29T17:25:52.293188+00:00, confidence not recorded.
  - readme: https://github.com/symfony/http-foundation (fetched 2026-08-28T04:10:23.904891+00:00, sha 64152177d226)
  - homepage: https://symfony.com/http-foundation (fetched 2026-08-29T08:26:15.594405+00:00, sha cb7b78c6e277)
  - site_page: https://symfony.com/doc (fetched 2026-08-29T08:26:15.597130+00:00, sha 44889134f4fb)
  - site_page: https://symfony.com/doc/current/components/http_foundation.html (fetched 2026-08-29T08:26:15.598999+00:00, sha 18402ba4814d)
  - site_page: https://symfony.com/projects/phpmyfaq (fetched 2026-08-29T08:26:15.601679+00:00, sha e9c38f954f59)
  - site_page: https://symfony.com/releases (fetched 2026-08-29T08:26:15.604346+00:00, sha f109a7a4a5da)
  - site_page: https://symfony.com/blog/category/releases (fetched 2026-08-29T08:26:15.607608+00:00, sha 373d532304d3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
