PHPackages                             mileschou/mocker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. mileschou/mocker

ActiveLibrary[HTTP &amp; Networking](/categories/http)

mileschou/mocker
================

The mock helper for HTTP client.

v2.1.0(1y ago)51.3k1MITPHPPHP ^8.1CI failing

Since Apr 8Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/MilesChou/mocker)[ Packagist](https://packagist.org/packages/mileschou/mocker)[ Fund](https://www.paypal.me/mileschou)[ RSS](/packages/mileschou-mocker/feed)WikiDiscussions 2.x Synced 5d ago

READMEChangelog (4)Dependencies (4)Versions (7)Used By (0)

Mocker for HTTP Client
======================

[](#mocker-for-http-client)

[![tests](https://github.com/MilesChou/mocker/workflows/tests/badge.svg)](https://github.com/MilesChou/mocker/workflows/tests/badge.svg)[![codecov](https://camo.githubusercontent.com/ef0f92b693ac7b2fe2c5653a2a7f8d30a48fd22c8897f6d9fd056600b0b50a15/68747470733a2f2f636f6465636f762e696f2f67682f4d696c657343686f752f6d6f636b65722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/MilesChou/mocker)[![Codacy Badge](https://camo.githubusercontent.com/83f49eefb088c3d3a7a0551eacc1cba82d338868bf3912dd13f53199e8b19fa3/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3437666363373937353364663462313138356165383566343031346334363939)](https://www.codacy.com/manual/MilesChou/mocker)[![Latest Stable Version](https://camo.githubusercontent.com/55b6a67cb90a79db88d7d60a68786bc2576f4c63cff45db4417376e0005c9158/68747470733a2f2f706f7365722e707567782e6f72672f4d696c657343686f752f6d6f636b65722f762f737461626c65)](https://packagist.org/packages/MilesChou/mocker)[![Total Downloads](https://camo.githubusercontent.com/b9302c27d6a84e1390a028cfb6466b2928294e1aab94051b437b2b3dfbd96d14/68747470733a2f2f706f7365722e707567782e6f72672f4d696c657343686f752f6d6f636b65722f642f746f74616c2e737667)](https://packagist.org/packages/MilesChou/mocker)[![License](https://camo.githubusercontent.com/1f8539b776490ededf13143021b1c7e9c022bb25bc47f5cfad9c27f2e49cd912/68747470733a2f2f706f7365722e707567782e6f72672f4d696c657343686f752f6d6f636b65722f6c6963656e7365)](https://packagist.org/packages/MilesChou/mocker)

The mock helper for HTTP client.

Installation
------------

[](#installation)

Support PHP version:

- 1.x Support PHP 7.1 ~ 8.2 And Guzzle 6.1+
- 2.x Support PHP 8.0 ~ 8.3 And Guzzle 7.0+

Use Composer to install.

```
composer require mileschou/mocker

```

Usage
-----

[](#usage)

- [Guzzle](docs/guzzle.md)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance48

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~379 days

Recently: every ~386 days

Total

6

Last Release

332d ago

Major Versions

1.x-dev → v2.0.02024-02-05

PHP version history (3 changes)v1.0.0PHP &gt;=7.1

v1.1.0PHP ^7.1 | ^8.0

v2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/20872dcc4b888075f03819d5470db8198ffcc5f9edb791aba5f007e34355a6c9?d=identicon)[MilesChou](/maintainers/MilesChou)

---

Top Contributors

[![MilesChou](https://avatars.githubusercontent.com/u/1258752?v=4)](https://github.com/MilesChou "MilesChou (16 commits)")[![ChengKaiChiang](https://avatars.githubusercontent.com/u/56571843?v=4)](https://github.com/ChengKaiChiang "ChengKaiChiang (1 commits)")

---

Tags

guzzlemockpsr-18http client

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/mileschou-mocker/health.svg)

```
[![Health](https://phpackages.com/badges/mileschou-mocker/health.svg)](https://phpackages.com/packages/mileschou-mocker)
```

###  Alternatives

[psr/http-client

Common interface for HTTP clients

1.7k680.7M2.1k](/packages/psr-http-client)[kriswallsmith/buzz

Lightweight HTTP client

2.0k31.3M443](/packages/kriswallsmith-buzz)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)[smi2/phpclickhouse

PHP ClickHouse Client

83510.1M71](/packages/smi2-phpclickhouse)[eightpoints/guzzle-bundle

Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony. Comes with easy and powerful configuration options and optional plugins.

45912.1M55](/packages/eightpoints-guzzle-bundle)[laminas/laminas-http

Provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests

3729.5M267](/packages/laminas-laminas-http)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
