This repository provides a set of PHP interfaces (contracts) for HTTP client operations, extracted from the Symfony framework. It defines the core abstractions: HttpClientInterface for issuing requests, ResponseInterface for lazy response handling, ChunkInterface for streaming response chunks, and ResponseStreamInterface for iterating over chunks from multiple responses. A full hierarchy of exception interfaces (Transport, Client, Server, Redirection, Timeout, Decoding) is included, along with a reference test suite (HttpClientTestCase) that validates any implementation against a set of comprehensive scenarios. The package contains no concrete implementations; it is purely a contract to ensure interoperability among different HTTP client libraries. The code is clean, well-documented, and leverages modern PHP 8.1 features like mixed types and static return types. It is actively maintained with zero open issues and follows semantic versioning as part of the Symfony contracts.
This repository is the central specification and test suite hub for the RealWorld project (a Medium.com clone demo app). It does not contain any runnable application code. Instead, it defines the API contract via an OpenAPI spec (specs/api/openapi.yml), provides comprehensive test suites in Hurl and Bruno formats for backend validation, and a shared Playwright E2E test suite for frontend validation. It also includes a shared CSS theme (assets/theme/styles.css), documentation built with Astro/Starlight (docs/), and SVG logo generation scripts. The repository serves as the single source of truth that all RealWorld implementations (over 100 backends and frontends) must conform to. Its architecture is that of a specification and validation toolkit, not a deployable service. Key entry points are the Makefile for running tests and generating Bruno collections, and the test runner scripts in specs/api/. External dependencies include Hurl, Bruno, Playwright, Bun, and Astro.