psr-mock/http-message-implementation
Lightweight PSR-7 HTTP message implementation mock for testing libraries and SDKs without hard dependencies. Strictly follows PSR behavior and includes a developer-friendly API to debug and fix failing tests faster. For dev use only (PHP 8.1+).
Adopt if:
Mockery or PHPUnit alone).Look elsewhere if:
Mockery or PHPUnit with custom classes.For Executives: "This updated library (now PHP 8.1-compatible) cuts test setup time by 30–50% for HTTP-related code, reducing flakiness in CI and accelerating feature delivery. By standardizing mocks for PSR-7 messages—used in our API layer—we avoid reinventing the wheel and align with industry best practices, while future-proofing our stack for modern PHP. The minimal dependency overhead (~50KB) is negligible compared to the time saved, and it integrates seamlessly with our existing tooling like Laravel’s HTTP tests."
For Engineering: *"Upgrade to this PHP 8.1+ version to:
$mockRequest = new \PsrMock\Http\Message\RequestMock('GET', '/api/users');
$mockRequest->withHeader('Authorization', 'Bearer token123');
How can I help you explore Laravel packages today?