PHPackages                             kohanaworld/http-mock - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. kohanaworld/http-mock

ActiveLibrary[Testing &amp; Quality](/categories/testing)

kohanaworld/http-mock
=====================

Mock HTTP requests on the server side in your PHP unit tests, PSR/7 Fork of internations version php: &gt;= 8.2

2.0.2(1y ago)125[1 PRs](https://github.com/kohanaworld/http-mock/pulls)MITPHPPHP &gt;= 8.2

Since Oct 4Pushed 1y agoCompare

[ Source](https://github.com/kohanaworld/http-mock)[ Packagist](https://packagist.org/packages/kohanaworld/http-mock)[ RSS](/packages/kohanaworld-http-mock/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (10)Versions (34)Used By (0)

HTTP Mock for PHP
=================

[](#http-mock-for-php)

[![Test](https://github.com/kohanaworld/http-mock/actions/workflows/test.yaml/badge.svg)](https://github.com/kohanaworld/http-mock/actions/workflows/test.yaml)[![channel icon](https://camo.githubusercontent.com/94b2d9dd41c196f57f7064b0ec84d4db1d8f3859e210989ef7dd37ae9b33e782/68747470733a2f2f6b6f68616e61776f726c642e6769746875622e696f2f74656c656772616d2d62616467652f636861742e706e67)](https://t.me/kohanaworld)

Mock HTTP requests on the server side in your PHP unit tests.

HTTP Mock for PHP mocks the server side of an HTTP request to allow integration testing with the HTTP side. It uses PHP’s builtin web server to start a second process that handles the mocking. The server allows registering request matcher and responses from the client side.

*BIG FAT WARNING:* software like this is inherently insecure. Only use in trusted, controlled environments.

Usage
-----

[](#usage)

Read the [docs](doc/index.md)

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance49

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 70.8% 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 ~149 days

Recently: every ~175 days

Total

30

Last Release

376d ago

Major Versions

0.15.5 → 1.0.02023-09-05

1.0.2 → 2.0.02023-11-16

PHP version history (8 changes)0.7.2PHP &gt;=5.4.0

0.7.8PHP &gt;=5.6.0

0.10.0PHP ~7

0.12.1PHP ~7.1

0.13.0PHP ~7.2

1.0.0PHP ^8.1

1.0.2PHP ^8.2

2.0.0PHP &gt;= 8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/6dfa784bd0729ef2d339b5fcfc5bf86332054cacfd7835cb9f8599a6fd37fdcb?d=identicon)[kohanaxworld](/maintainers/kohanaxworld)

---

Top Contributors

[![lstrojny](https://avatars.githubusercontent.com/u/79707?v=4)](https://github.com/lstrojny "lstrojny (148 commits)")[![Felynx3](https://avatars.githubusercontent.com/u/23015568?v=4)](https://github.com/Felynx3 "Felynx3 (13 commits)")[![kohanax](https://avatars.githubusercontent.com/u/171699062?v=4)](https://github.com/kohanax "kohanax (10 commits)")[![rgdevment](https://avatars.githubusercontent.com/u/10289498?v=4)](https://github.com/rgdevment "rgdevment (7 commits)")[![gabfr](https://avatars.githubusercontent.com/u/1237163?v=4)](https://github.com/gabfr "gabfr (6 commits)")[![jeichorn](https://avatars.githubusercontent.com/u/122486?v=4)](https://github.com/jeichorn "jeichorn (6 commits)")[![crellbar](https://avatars.githubusercontent.com/u/1368592?v=4)](https://github.com/crellbar "crellbar (3 commits)")[![damour](https://avatars.githubusercontent.com/u/881794?v=4)](https://github.com/damour "damour (2 commits)")[![ademarco](https://avatars.githubusercontent.com/u/153362?v=4)](https://github.com/ademarco "ademarco (2 commits)")[![chrisjohnson00](https://avatars.githubusercontent.com/u/1231933?v=4)](https://github.com/chrisjohnson00 "chrisjohnson00 (2 commits)")[![phpclub](https://avatars.githubusercontent.com/u/370807?v=4)](https://github.com/phpclub "phpclub (1 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")[![alexeyshockov](https://avatars.githubusercontent.com/u/203120?v=4)](https://github.com/alexeyshockov "alexeyshockov (1 commits)")[![kasperg](https://avatars.githubusercontent.com/u/73966?v=4)](https://github.com/kasperg "kasperg (1 commits)")[![darkmantle](https://avatars.githubusercontent.com/u/410651?v=4)](https://github.com/darkmantle "darkmantle (1 commits)")[![cbywater](https://avatars.githubusercontent.com/u/1188673?v=4)](https://github.com/cbywater "cbywater (1 commits)")[![micxer](https://avatars.githubusercontent.com/u/661595?v=4)](https://github.com/micxer "micxer (1 commits)")[![mtdowling](https://avatars.githubusercontent.com/u/190930?v=4)](https://github.com/mtdowling "mtdowling (1 commits)")[![costinh](https://avatars.githubusercontent.com/u/17596437?v=4)](https://github.com/costinh "costinh (1 commits)")[![franzliedke](https://avatars.githubusercontent.com/u/249125?v=4)](https://github.com/franzliedke "franzliedke (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kohanaworld-http-mock/health.svg)

```
[![Health](https://phpackages.com/badges/kohanaworld-http-mock/health.svg)](https://phpackages.com/packages/kohanaworld-http-mock)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.9k556.2M21.5k](/packages/laravel-framework)[oat-sa/tao-core

TAO core extension

64147.9k151](/packages/oat-sa-tao-core)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19467.3M1.9k](/packages/drupal-core)[azuracast/azuracast

The AzuraCast self-hosted web radio station management suite.

4.0k27.9k](/packages/azuracast-azuracast)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

762297.9k53](/packages/civicrm-civicrm-core)

PHPackages © 2026

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