psr-mock/http-factory-implementation
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.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| php-mock/php-mock | 0.89 | 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 | 374 | 20 | 494K | 3 | 18.9 | 47.6 | WTFPL | 6 months ago | |
| mpyw/mockery-pdo | 0.88 | Experimental BDD-style PDO mocking library built on mockery/mockery. Define expectations for prepare/bind/execute and return rows via fetch/fetchAll in a fluent API, making PDO-based code easy to test on PHP 8.2+. | 3 | 3 | 2 | 1K | 1 | 9.9 | 37.7 | MIT | 7 months 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 | 12K | 1 | 18.5 | 44.4 | GPL-3.0 | 3 months ago | |
| psr-mock/http-message-implementation | 0.87 | 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 | 2K | 0 | 0.6 | 46.8 | MIT | 2 years ago | |
| mpyw/laravel-database-mock | 0.87 | — | 6 | 6 | 0 | 3K | 0 | 19.6 | 42.8 | MIT | 1 month ago | |
| polishsymfonycommunity/symfony2-mocker-extension | 0.87 | Behat extension for Symfony2 that lets you mock services in the dependency injection container during tests. Built on Mockery and SymfonyMockerContainer. Consider it a hack and use sparingly; alternative: TestDoubleBundle. | 26 | 26 | 7 | 132 | 0 | 0.6 | 10.1 | MIT | 10 years ago | |
| mcustiel/phiremock-common | 0.86 | Shared utilities for the Phiremock PHP ecosystem. Provides common classes, interfaces, and helpers used across related packages to simplify building and consuming Phiremock client/server components with consistent behavior and minimal duplication. | 3 | 3 | 5 | 13K | 1 | 16.4 | 54.0 | GPL-3.0 | 4 months 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 | 5K | 1 | 3.5 | 52.7 | MIT | 3 years ago | |
| mcustiel/phiremock | 0.86 | — | 150 | 153 | 15 | 8K | 1 | 10.3 | 23.9 | GPL-3.0 | 5 years ago | |
| jcchavezs/httptest | 0.86 | Spin up a lightweight local HTTP server for integration testing real HTTP calls (e.g., cURL). Define a request handler to assert method/headers/body and craft responses, enabling client- and server-side assertions without mocking HTTP. | 9 | 9 | 1 | 199 | 2 | 1.7 | 18.2 | — | 8 years ago | |
| mcustiel/phiremock-server | 0.86 | PHP HTTP mock/stub server inspired by WireMock. Mock requests by method/headers/URL/body/forms, set responses via REST API, support scenarios, priorities, latency simulation, verification counts, proxying, and loading expectations from JSON files. | 19 | 19 | 6 | 15K | 1 | 19.8 | 45.0 | GPL-3.0 | 4 months ago | |
| janmarek/mockista | 0.86 | Mockista is a lightweight mocking library for PHP/Laravel that helps you create and configure test doubles quickly. Define expectations, stub methods, and verify calls with a simple, fluent API to keep unit tests fast, readable, and maintainable. | 29 | 29 | 14 | 361 | 2 | 1.4 | 16.9 | — | — | |
| psr-mock/http-client-implementation | 0.86 | 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 | 2K | 0 | 0.6 | 42.5 | MIT | 2 years ago | |
| psr-mock/http | 0.86 | 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. | 1 | 1 | 0 | 1K | 0 | 0.6 | 38.5 | MIT | 2 years ago | |
| boson-php/http-static-provider | 0.85 | Laravel/PHP package that provides a static HTTP provider for Boson, useful for serving fixed responses in tests, mocks, or offline scenarios. Simple setup to return predefined status, headers, and body without making real network requests. | 0 | 0 | 0 | 22 | 0 | 0.0 | 18.8 | MIT | — | |
| donatj/mock-webserver | 0.85 | 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. | 139 | 140 | 22 | 52K | 5 | 22.5 | 41.4 | MIT | 5 months ago | |
| guzzle/plugin-mock | 0.85 | 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 | 505 | 0 | 0.0 | 29.1 | — | — | |
| phrity/net-mock | 0.85 | Mocking layer for phrity/net-stream to simplify testing stream-based code. Drop-in compatible stream classes that can log all interactions via any PSR-3 logger and override behavior with callbacks. Includes PHPUnit expectation traits for asserting calls and parameters. | 0 | 0 | 0 | 651 | 0 | 16.9 | 43.6 | MIT | 4 months ago | |
| guzzlehttp/test-server | 0.84 | — | 14 | 14 | 2 | 38K | 0 | 23.5 | 55.3 | MIT | 2 weeks ago | |
| polishsymfonycommunity/symfony-mocker-container | 0.84 | — | 144 | 144 | 10 | 53K | 1 | 2.9 | 35.4 | — | 3 years ago |
How can I help you explore Laravel packages today?