Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mock Client Laravel Package

php-http/mock-client

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs Buy: Eliminates the need to build/maintain a custom mock client, saving engineering resources and reducing technical debt.
  • Roadmap Integration: Accelerates CI/CD pipelines by enabling fast, isolated HTTP tests without external dependencies, supporting faster feature delivery.
  • Use Cases: Test edge cases (timeouts, 5xx errors, rate limits), validate request headers/payloads against API contracts, and simulate third-party service failures without real network calls.

When to Consider This Package

Adopt this package when your project uses HTTPlug or PSR-18-compliant HTTP clients and requires deterministic, isolated testing of HTTP interactions. Ideal for teams needing to simulate predefined responses/errors in unit tests while maintaining speed and reliability. Avoid if your stack uses non-PSR-18 clients (e.g., direct Guzzle usage without abstraction), requires dynamic response generation based on request content, or needs complex integration testing (e.g., stateful multi-service workflows—opt for Wire

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours