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+).
Illuminate\Http\Request, Illuminate\Http\Response) continues to integrate seamlessly, though PHP 8.1’s stricter typing may expose edge cases in custom mock logic.composer require psr-mock/http-message-implementation), but PHP 8.1+ requirement may block legacy Laravel 8.x projects (PHP 7.4+).Request/Response objects is unchanged, but PHP 8.1’s type system may surface issues with Laravel’s extensions (e.g., Jsonable, File uploads) if not explicitly tested.#[\Override]) may require adjustments in test assertions or mock setups.UploadedFile mocks, custom headers with non-string values).nyholm/psr7) persists, but PHP 8.1’s stricter autoloading may reduce ambiguity.php-mock/psr7-mock).composer.json to enforce PHP 8.1+:
"require": {
"php": "^8.1",
"psr-mock/http-message-implementation": "^1.0"
}
UploadedFile, streaming responses).Jsonable, signed requests).-dzend.assertions=1).null vs. false in headers).array headers must be string[]).php-mock/psr7-mock as a fallback.UploadedFile mocks) may require deeper debugging due to PHP 8.1’s stricter checks.Jsonable) may still need custom mock logic.php-mock/psr7-mock).null headers).UploadedFile with PHP 8.1’s TempFile.null vs. false in headers.Attribute usage in tests).How can I help you explore Laravel packages today?