PHPackages                             pagely/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. pagely/http-mock

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

pagely/http-mock
================

Mock HTTP requests on the server side in your PHP unit tests, PSR/7 Fork of internations version

1.0.1(6y ago)0139.4k1MITPHPPHP ~7.1CI failing

Since Oct 4Pushed 2y agoCompare

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

READMEChangelog (2)Dependencies (8)Versions (19)Used By (0)

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

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

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. This is a fork of

Its been updated to use PSR/7 Http methods, and Slim on the server side. The API has been kept the same where possible, but any direct use of Request or Response objects will be different.

Usage
-----

[](#usage)

`composer require --dev pagely/http-mock`

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

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% 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 ~169 days

Recently: every ~125 days

Total

15

Last Release

2320d ago

Major Versions

0.12.1 → 1.0.02019-05-31

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

0.7.8PHP &gt;=5.6.0

0.10.0PHP ~7

0.12.1PHP ~7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/122486?v=4)[Joshua Eichorn](/maintainers/jeichorn)[@jeichorn](https://github.com/jeichorn)

---

Top Contributors

[![lstrojny](https://avatars.githubusercontent.com/u/79707?v=4)](https://github.com/lstrojny "lstrojny (148 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)")[![chrisjohnson00](https://avatars.githubusercontent.com/u/1231933?v=4)](https://github.com/chrisjohnson00 "chrisjohnson00 (2 commits)")[![ademarco](https://avatars.githubusercontent.com/u/153362?v=4)](https://github.com/ademarco "ademarco (2 commits)")[![franzliedke](https://avatars.githubusercontent.com/u/249125?v=4)](https://github.com/franzliedke "franzliedke (1 commits)")[![gabfr](https://avatars.githubusercontent.com/u/1237163?v=4)](https://github.com/gabfr "gabfr (1 commits)")[![gforsythe-godaddy](https://avatars.githubusercontent.com/u/95944072?v=4)](https://github.com/gforsythe-godaddy "gforsythe-godaddy (1 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")[![kasperg](https://avatars.githubusercontent.com/u/73966?v=4)](https://github.com/kasperg "kasperg (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)")[![alexeyshockov](https://avatars.githubusercontent.com/u/203120?v=4)](https://github.com/alexeyshockov "alexeyshockov (1 commits)")[![baohx2000](https://avatars.githubusercontent.com/u/486322?v=4)](https://github.com/baohx2000 "baohx2000 (1 commits)")[![cbywater](https://avatars.githubusercontent.com/u/1188673?v=4)](https://github.com/cbywater "cbywater (1 commits)")[![costinh](https://avatars.githubusercontent.com/u/17596437?v=4)](https://github.com/costinh "costinh (1 commits)")[![darkmantle](https://avatars.githubusercontent.com/u/410651?v=4)](https://github.com/darkmantle "darkmantle (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.9k556.2M21.3k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k20](/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)[spatie/laravel-health

Monitor the health of a Laravel application

88212.7M185](/packages/spatie-laravel-health)[civicrm/civicrm-core

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

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

PHPackages © 2026

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