# php-fig/http-factory

Implementation of PSR-17 (HTTP Message Factories)

Repository: https://github.com/php-fig/http-factory
Canonical: https://ross.abutalabs.com/products/http-factory
Homepage: https://www.php-fig.org/psr/psr-17/
Language: PHP
License: MIT
License Family: permissive
Topics: php, php-fig, http, http-requests
Last push: 2024-05-10T07:32:17+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2956, "days_push": 845, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1890, forks 26 (observed 2026-08-28T04:05:49.371290+00:00)

## What it is
PHP-FIG's PSR-17 interfaces describing factories for creating PSR-7 HTTP message objects (requests, responses, URIs, streams, uploaded files). It provides only interfaces, not an implementation, enabling interoperability between HTTP libraries and frameworks.

## Use cases
- create PSR-7 HTTP messages without coupling to a specific implementation
- write framework-agnostic PHP middleware that needs request/response factories
- swap HTTP message implementations in a PHP application via a standard interface
- build reusable PHP packages that construct HTTP requests and responses
- type-hint against a standard HTTP factory in dependency injection containers

## When to choose
- you are building PHP libraries or middleware that must interoperate with any PSR-7 implementation
- you need standard interfaces to inject HTTP message factories into your components
- you are implementing PSR-17 in your own HTTP message library

## When to avoid
- you need an actual working HTTP factory implementation rather than interfaces
- your project does not use PSR-7 HTTP messages
- you are not working in PHP

## Facets
- artifact type: library
- maturity: stable
- function: http-client, http-server, middleware
- domain: web-development, backend, apis
- platform: php
- tags: psr-17, psr-7, http-factories, interfaces, interop, php-fig, standards

## Member repositories
- php-fig/http-factory (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:49.371290+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:13:02.695457+00:00, confidence not recorded.
  - readme: https://github.com/php-fig/http-factory (fetched 2026-08-28T04:05:49.371290+00:00, sha d80b63e2a8c4)
  - homepage: https://www.php-fig.org/psr/psr-17/ (fetched 2026-08-29T10:52:14.568561+00:00, sha e25b56700360)
  - site_page: https://www.php-fig.org/faqs (fetched 2026-08-29T10:52:14.571182+00:00, sha a652ee5a57f9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
