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

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

darkmatus/phiremock
===================

A mocker for HTTP and REST services. Full bundle.

v3.0.4(4y ago)01.2kGPL-3.0-or-laterPHPPHP ^8

Since Mar 3Pushed 4y agoCompare

[ Source](https://github.com/darkmatus/phiremock)[ Packagist](https://packagist.org/packages/darkmatus/phiremock)[ RSS](/packages/darkmatus-phiremock/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (50)Used By (0)

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)

[![SensioLabsInsight](https://camo.githubusercontent.com/cc18da7781585d4a731f5b5e02225e5a92fcf3397daebe1c3c25eadce51354a8/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f35356665623331372d376134362d343835382d383633342d3331626663383964373730392f6269672e706e67)](https://insight.sensiolabs.com/projects/55feb317-7a46-4858-8634-31bfc89d7709)

**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

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 91.4% 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 ~54 days

Recently: every ~100 days

Total

40

Last Release

1579d ago

Major Versions

v0.8.4 → v1.0.02016-03-07

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

v2.1.0 → v3.02020-12-08

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

v1.3.4PHP &gt;=5.6

v2.0.0-alpha.1PHP ^7.2

v3.0PHP 8.0

v3.0.2PHP ^8.0

v3.0.3PHP &gt;=8.0

v3.0.4PHP ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/59c813eeb0b57a907699a276db66516019115bede29bc638ea10bdcc771643a3?d=identicon)[Darkmatus](/maintainers/Darkmatus)

---

Top Contributors

[![mcustiel](https://avatars.githubusercontent.com/u/3268370?v=4)](https://github.com/mcustiel "mcustiel (320 commits)")[![darkmatus](https://avatars.githubusercontent.com/u/2587708?v=4)](https://github.com/darkmatus "darkmatus (7 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

httpclientbundlemockservertestsexternalacceptance

### Embed Badge

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

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

###  Alternatives

[mcustiel/phiremock

A mocker for HTTP and REST services. Full bundle.

151947.1k5](/packages/mcustiel-phiremock)[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.7M779](/packages/php-http-mock-client)[doppiogancio/mocked-client

A simple way to mock a client

2174.9k3](/packages/doppiogancio-mocked-client)

PHPackages © 2026

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