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

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

darkmatus/phiremock-client
==========================

Client library to communicate with Phiremock server

v2.0.4(4y ago)01.2k1GPL-3.0-or-laterPHPPHP ^8

Since Aug 6Pushed 4y agoCompare

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

READMEChangelogDependencies (10)Versions (12)Used By (1)

Phiremock Client
================

[](#phiremock-client)

Phiremock client provides a nice API to interact with [Phiremock Server](https://github.com/mcustiel/phiremock-server), allowing developers to setup expectations, clear state, scenarios etc. Through a fluent interface.

[![Packagist Version](https://camo.githubusercontent.com/88d5f1443f1fa7230636254694c662c30722a59be5aa78660e44beaba2b10f71/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6375737469656c2f70686972656d6f636b2d636c69656e74)](https://packagist.org/packages/mcustiel/phiremock-server)[![Build Status](https://camo.githubusercontent.com/3e47956f11348cd23f9f549dfd5f4f0c8689c127bfacc0cb04ac828af9a5d6d7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6375737469656c2f70686972656d6f636b2d636c69656e742f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mcustiel/phiremock-client/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0a812eea22ed129fbdcaeb72bd403873f7af6e8277c2a520a5f8fabde1ff55c2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6375737469656c2f70686972656d6f636b2d636c69656e742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mcustiel/phiremock-client/?branch=master)[![Packagist Downloads](https://camo.githubusercontent.com/16bbb28db03da934f166e6f8ace8ab7057c8f93cdbf5c39e680093a8a8117c21/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6d6375737469656c2f70686972656d6f636b2d636c69656e74)](https://packagist.org/packages/mcustiel/phiremock-server)

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

[](#installation)

### Default installation through composer

[](#default-installation-through-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-client": "^1.0",
        "guzzlehttp/guzzle": "^6.0"
    }
```

Phiremock Client requires guzzle client v6 to work. This dependency can be avoided and you can choose any psr18-compatible http client and overwrite Phiremock Client's factory to provide it.

### Overwriting the factory class

[](#overwriting-the-factory-class)

If guzzle client v6 is provided as a dependency no extra configuration is needed. If you want to use a different http client you need to provide it to phiremock server as a psr18-compatible client. For instance, if you want to use guzzle client v7 you need to extend phiremock server's factory class:

```
