psr-mock/http
psr-mock/http is a tiny PHP package for mocking PSR-7 HTTP messages in tests. Create predictable request/response objects without a full HTTP client, helping you unit test middleware, clients, and services with minimal setup.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| psr-mock/http-client-implementation | 0.89 | Tiny PSR-18 HTTP client implementation intended for mocking and testing. Provides a simple client you can plug into PSR-7/PSR-17 workflows to return predefined responses without real network calls. | 1 | 1 | 0 | 3K | 0 | 0.6 | 44.8 | MIT | 2 years ago | |
| mcustiel/phiremock-client | 0.88 | PHP client for Phiremock Server with a fluent API to define HTTP expectations, manage scenarios, and reset server state. Works with Guzzle 6 by default, or any PSR-18 HTTP client by overriding the factory for custom connections. | 16 | 16 | 9 | 11K | 1 | 17.1 | 43.6 | GPL-3.0 | 7 months ago | |
| psr-mock/http-message-implementation | 0.88 | 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+). | 0 | 0 | 1 | 4K | 0 | 0.6 | 49.0 | MIT | 2 years ago | |
| psr-mock/http-factory-implementation | 0.88 | Lightweight PSR-17/PSR-7 HTTP factory/message mock implementation for PHP 8.1+. Built for SDKs and libraries to test against PSR interfaces without hard deps, with strict PSR compliance and helpful debugging API. | 0 | 0 | 0 | 4K | 0 | 0.6 | 50.0 | MIT | 2 years ago | |
| middlewares/request-handler | 0.88 | PSR-15/PSR-7 request handler middleware for PHP. Build a flexible pipeline that routes an incoming ServerRequest to your handler stack, with clean delegation and composable middlewares—ideal for frameworks or custom apps needing standard request processing. | 43 | 46 | 5 | 71K | 0 | 4.9 | 44.3 | MIT | 1 year ago | |
| php-mock/php-mock | 0.88 | Mock built-in PHP functions like time() or rand() in tests by leveraging PHP’s namespace fallback: define namespaced replacements for unqualified calls. Works in non-global namespaces; supports common test frameworks via integrations (e.g., PHPUnit). | 370 | 375 | 19 | 726K | 3 | 13.0 | 47.8 | WTFPL | 9 months ago | |
| guzzle/plugin-mock | 0.87 | guzzle/plugin-mock provides a mock plugin for Guzzle, letting you queue predefined responses and simulate HTTP requests during testing. Useful for isolating API clients, reproducing edge cases, and running fast, reliable unit tests without real network calls. | 3 | 3 | 0 | 586 | 0 | 0.0 | 30.0 | — | — | |
| tomb1n0/guzzle-mock-handler | 0.87 | Lightweight mock handler for Guzzle to fake HTTP responses in tests. Queue responses, simulate status codes, headers, and body content, and inspect requests without making real network calls—useful for unit/integration testing of API clients. | 3 | 3 | 2 | 4K | 4 | 1.1 | 42.0 | MIT | — | |
| bneumann/mock-api-bundle | 0.87 | — | 2 | 2 | 0 | 0 | 0 | 0.0 | — | MIT | — | |
| psr-discovery/http-client-implementations | 0.86 | Discovers an installed PSR-18 HTTP client at runtime by checking for well-known implementations and returning the first available instance. Ideal for SDKs/libraries to support PSR-18 without hard dependencies or extra user configuration. | 7 | 7 | 5 | 725K | 0 | 9.2 | 58.6 | MIT | 7 months ago | |
| php-http/client-integration-tests | 0.86 | Integration test suite for PHP HTTP clients and adapters. Provides a shared test server and PHPUnit testsuite so you can verify that your client correctly implements the PSR-18 and HTTPlug contracts against real HTTP requests. | 16 | 17 | 10 | 555 | 1 | 19.6 | 23.7 | MIT | 4 months ago | |
| php-http/mock-client | 0.86 | Mock HTTP client for HTTPlug/PHP-HTTP. Stores outgoing requests and returns queued responses or throws exceptions instead of making real network calls—ideal for unit tests of HTTP-dependent code. Install via Composer as a dev dependency. | 71 | 75 | 16 | 266K | 0 | 6.0 | 49.3 | MIT | 2 years ago | |
| http-interop/http-factory-tests | 0.86 | Unit tests for HTTP Factory implementations. Add test suite config to phpunit.xml and define factory class constants, then validate your PSR-17 request, response, server request, stream, uploaded file, and URI factories. | 11 | 12 | 8 | 20K | 0 | 20.1 | 51.7 | MIT | 1 month ago | |
| psr/http-server-middleware | 0.86 | PSR-15 HTTP server middleware interfaces for PHP. Provides the MiddlewareInterface specification used by request handlers and middleware stacks; no implementation included. Install via psr/http-server-middleware and use with compatible frameworks or libraries. | 187 | 201 | 11 | 6M | 0 | 1.6 | 55.3 | MIT | 3 years ago | |
| donatj/mock-webserver | 0.86 | Lightweight PHP mock web server for tests and local development. Spin up an HTTP server on a random port, enqueue canned responses, inspect received requests, and simulate endpoints reliably. Handy for integration tests without external services. | 141 | 142 | 22 | 72K | 5 | 17.6 | 42.3 | MIT | 8 months ago | |
| guzzlehttp/test-server | 0.86 | Guzzle Test Server is a dev-only testing helper that starts a local Node.js HTTP server, letting PHP tests queue responses and inspect received requests for handler and integration tests. | 14 | 14 | 2 | 23K | 0 | 23.4 | 51.4 | MIT | 2 weeks ago | |
| php-http/psr7-integration-tests | 0.86 | A PHPUnit-based integration test suite for PSR-7 HTTP message implementations. It verifies requests, responses, streams, URIs, and headers against the PSR-7 specification, helping libraries like Guzzle, Laminas, Slim, and Nyholm ensure compliance. | 41 | 42 | 23 | 3K | 1 | 22.8 | 30.1 | MIT | 2 weeks ago | |
| loophp/psr17 | 0.86 | loophp/psr17 provides a PSR-17 HTTP message factory implementation for PHP, helping you create PSR-7 requests, responses, streams, URIs, and uploaded files in a standards-compliant way. Suitable for libraries and middleware needing PSR factories. | 1 | 1 | 0 | 8K | 1 | 3.5 | 54.2 | MIT | 3 years ago | |
| guzzlehttp/psr7 | 0.86 | PSR-7 HTTP message implementation for PHP: request, response, URI, uploaded file, and stream objects compatible with Guzzle and any PSR-7 library. Create or inspect messages without sending requests; includes factories and helpers. | 7,929 | 7,994 | 28 | 31M | 3 | 60.7 | 58.7 | MIT | 2 weeks ago | |
| psr-discovery/http-factory-implementations | 0.85 | Discovers a PSR-17 HTTP factory at runtime by scanning for well-known implementations and returning the first available instance. Ideal for libraries/SDKs that want PSR-17 support without hard dependencies or user configuration. PHP 8.2+. | 7 | 7 | 3 | 517K | 0 | 1.7 | 55.3 | MIT | 1 year ago |
How can I help you explore Laravel packages today?