sabre/http
sabre/http wraps PHP’s HTTP superglobals and output functions into easy-to-mock Request and Response objects. Use it to read input, headers, and body via a consistent API, and to generate responses cleanly in apps and libraries.
$_GET, $_POST, and $_SERVER usage.Request/Response objects (e.g., adding auth metadata) without tight coupling.HttpFoundation for projects where:
Client for async API calls (e.g., retries, parallel requests).RequestInterface to isolate components (e.g., auth middleware).Illuminate\Http\Request/Response (this package adds no value).For Executives:
"This package standardizes how our PHP services handle HTTP requests/responses, reducing bugs from inconsistent $_GET/$_POST usage. It’s a lightweight, battle-tested alternative to Symfony’s tools—ideal for modernizing legacy systems or building microservices. The decorator pattern lets teams add custom logic (e.g., auth checks) without refactoring core code. For APIs, it simplifies reverse proxies and async calls, cutting dev time by 30% vs. rolling our own solutions."
For Engineers: *"sabre/http gives you:
$_SERVER hell with typed Request/Response objects.RequestInterface for unit tests (no more global $_GET hacks).isLoggedIn()) per module.How can I help you explore Laravel packages today?