A mocker for HTTP and REST services. Full bundle.

Installs: 606 252

Dependents: 3

Suggesters: 0

Security: 0

Stars: 144

Watchers: 9

Forks: 14

Open Issues: 0


v2.1.1 2021-02-19 19:55 UTC


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, 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 and phiremock-codeception-module.
  • Fill the response body using data from the request.

Latest Stable Version Monthly Downloads

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



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"


Thanks to:

And everyone who submitted their Pull Requests.