PHPackages                             mcustiel/phiremock - 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. mcustiel/phiremock

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

mcustiel/phiremock
==================

A mocker for HTTP and REST services. Full bundle.

v2.1.1(5y ago)151947.1k—8.4%15[1 issues](https://github.com/mcustiel/phiremock/issues)5GPL-3.0-or-laterPHPPHP ^7.2 | ^8.0

Since Mar 3Pushed 3y ago8 watchersCompare

[ Source](https://github.com/mcustiel/phiremock)[ Packagist](https://packagist.org/packages/mcustiel/phiremock)[ RSS](/packages/mcustiel-phiremock/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (47)Used By (5)

Phiremock Bundle
================

[](#phiremock-bundle)

Phiremock is a mocker and stubber of HTTP services, it allows software developers to mock HTTP requests and setup responses to avoid calling real services during development, and is particulary useful during acceptance testing when expected http requests can be mocked and verified. Any HTTP service (i.e.: REST services) can be mocked and stubbed with Phiremock. Phiremock is heavily inspired by [WireMock](http://wiremock.org/), but does not force you to have a java installation in your PHP development environment. The full functionality of Phiremock is detailed in the following list:

- Allows to mock http request based in method, headers, url and body content.
- Allows to match expectations using regexp patterns or equality.
- REST interface to setup.
- Stateful and stateless mocking.
- Network latency simulation.
- Priorizable expectations for cases in which more than one matches the request. If more than one expectation matches the request and no priorities were set, the first match is returned.
- Allows to verify the amount of times a request was done.
- Allows to load default expectations from json files in a directory tree.
- Proxy requests to another URL as they are received.
- Client with fluent interface to configure Phiremock.
- Integration to codeception through [phiremock-codeception-extension](https://github.com/mcustiel/phiremock-codeception-extension) and [phiremock-codeception-module](https://github.com/mcustiel/phiremock-codeception-module).
- Fill the response body using data from the request.

[![Latest Stable Version](https://camo.githubusercontent.com/84c2f81a9ccceea754a6a3a918579a1e58f8a5d587b963c10b205c2bdaaffd2c/68747470733a2f2f706f7365722e707567782e6f72672f6d6375737469656c2f70686972656d6f636b2f762f737461626c65)](https://packagist.org/packages/mcustiel/phiremock)[![Monthly Downloads](https://camo.githubusercontent.com/91ab3579771b3e3641234d294a45772bdd258cfe7fd8694e15b35550026b82f5/68747470733a2f2f706f7365722e707567782e6f72672f6d6375737469656c2f70686972656d6f636b2f642f6d6f6e74686c79)](https://packagist.org/packages/mcustiel/phiremock)

**Note**: In version 2 Phiremock has separated libraries for the server and the client. This repository became the bundle for both libraries.

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

[](#installation)

### Composer:

[](#composer)

This project is published in packagist, so you just need to add it as a dependency in your composer.json:

```
    "require-dev": {
        "mcustiel/phiremock": "v2.0",
        "guzzlehttp/guzzle": "^6.0"
    }
```

See
---

[](#see)

- Phiremock Server:
- Phiremock Client:

Thanks to:
----------

[](#thanks-to)

- Denis Rudoi ([@drudoi](https://github.com/drudoi))
- Henrik Schmidt ([@mrIncompetent](https://github.com/mrIncompetent))
- Nils Gajsek ([@linslin](https://github.com/linslin))
- Florian Levis ([@Gounlaf](https://github.com/Gounlaf))

And [everyone](https://github.com/mcustiel/phiremock/graphs/contributors) who submitted their Pull Requests.

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity54

Moderate usage in the ecosystem

Community29

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 93.3% 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 ~53 days

Recently: every ~68 days

Total

37

Last Release

1811d ago

Major Versions

v0.8.4 → v1.0.02016-03-07

v1.12.1 → v2.0.0-alpha.12020-08-06

PHP version history (4 changes)v0.8PHP &gt;=5.5

v1.3.4PHP &gt;=5.6

v2.0.0-alpha.1PHP ^7.2

v2.1.1PHP ^7.2 | ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d9b3ff93206038debfa1f16a11bbfc10fca9b2f4ddfdafa00e27365d290cf0d?d=identicon)[mcustiel](/maintainers/mcustiel)

---

Top Contributors

[![mcustiel](https://avatars.githubusercontent.com/u/3268370?v=4)](https://github.com/mcustiel "mcustiel (321 commits)")[![drudoi](https://avatars.githubusercontent.com/u/8501350?v=4)](https://github.com/drudoi "drudoi (6 commits)")[![mrIncompetent](https://avatars.githubusercontent.com/u/14090308?v=4)](https://github.com/mrIncompetent "mrIncompetent (4 commits)")[![linslin](https://avatars.githubusercontent.com/u/6159031?v=4)](https://github.com/linslin "linslin (3 commits)")[![Gounlaf](https://avatars.githubusercontent.com/u/236413?v=4)](https://github.com/Gounlaf "Gounlaf (3 commits)")[![arnaudlabenne](https://avatars.githubusercontent.com/u/16992738?v=4)](https://github.com/arnaudlabenne "arnaudlabenne (2 commits)")[![nuzzio](https://avatars.githubusercontent.com/u/952411?v=4)](https://github.com/nuzzio "nuzzio (1 commits)")[![buflix](https://avatars.githubusercontent.com/u/5539506?v=4)](https://github.com/buflix "buflix (1 commits)")[![DanielNoga](https://avatars.githubusercontent.com/u/2734126?v=4)](https://github.com/DanielNoga "DanielNoga (1 commits)")[![KaelenProctor](https://avatars.githubusercontent.com/u/10130745?v=4)](https://github.com/KaelenProctor "KaelenProctor (1 commits)")[![AlexStansfield](https://avatars.githubusercontent.com/u/4319443?v=4)](https://github.com/AlexStansfield "AlexStansfield (1 commits)")

---

Tags

acceptance-testinghttpmockphpservicetestinghttpclientbundlemockservertestsexternalacceptance

### Embed Badge

![Health badge](/badges/mcustiel-phiremock/health.svg)

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

###  Alternatives

[mcustiel/phiremock-codeception-extension

Codeception extension for Phiremock. Allows to stub remote services for HTTP requests.

311.0M5](/packages/mcustiel-phiremock-codeception-extension)[mcustiel/phiremock-server

A mocker for HTTP and REST services

19843.6k9](/packages/mcustiel-phiremock-server)[mcustiel/phiremock-client

Client library to communicate with Phiremock server

16730.7k4](/packages/mcustiel-phiremock-client)[php-http/mock-client

Mock HTTP client

719.7M781](/packages/php-http-mock-client)[doppiogancio/mocked-client

A simple way to mock a client

2174.9k3](/packages/doppiogancio-mocked-client)[aeris/guzzle-http-mock

A mock library for verifying requests made with the Guzzle Http Client, and mocking responses.

2613.1k1](/packages/aeris-guzzle-http-mock)

PHPackages © 2026

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