http-message
The purpose of this PSR is to provide a set of common interfaces for HTTP messages as described in RFC 7230 and RFC 7231
php-fig/http-message is a PHP package that provides a set of shared interface definitions for HTTP messages. In PHP, an interface defines what methods an object must have without providing the actual code for those methods. This package defines the contracts for representing HTTP requests, responses, and related pieces like headers, URLs, and message bodies.
The package is part of PHP-FIG, which stands for PHP Framework Interoperability Group. This organization creates standards that allow different PHP frameworks and libraries to work together. The standard this package implements is called PSR-7, which specifies how HTTP messages should be represented in PHP code. PSR-7 is based on two internet standards: RFC 7230, which defines the HTTP/1.1 message format, and RFC 7231, which covers the semantics and content of those messages.
It is important to note that this package contains only interfaces, not a working implementation. Other libraries and frameworks provide the actual code that fulfills these interfaces. By coding to PSR-7 interfaces instead of a specific framework's classes, developers can write code that works with any library that implements the standard, making it easier to swap components in and out.
The README points to two documents: a list of all the methods defined by the PSR-7 interfaces, and a usage guide explaining how to work with those interfaces in practice. Both are linked within the repository itself.