PHPackages                             madkom/pact-php-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. madkom/pact-php-client

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

madkom/pact-php-client
======================

Client written in PHP for Pact-Mock-Service

0.8.2(9y ago)814.8k2[1 PRs](https://github.com/madkom/Pact-PHP-Client/pulls)MITPHP

Since Feb 13Pushed 6y ago6 watchersCompare

[ Source](https://github.com/madkom/Pact-PHP-Client)[ Packagist](https://packagist.org/packages/madkom/pact-php-client)[ Docs](http://madkom.pl/)[ RSS](/packages/madkom-pact-php-client/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (10)Versions (8)Used By (0)

Pact-PHP-Client
===============

[](#pact-php-client)

[![PHP 7.0](https://camo.githubusercontent.com/60f2b2577187e1ceca976d6a9f7a457c657b20dbf85d7a76a3ac28e32e740eb6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e302d3843394342362e7376673f7374796c653d666c6174)](https://camo.githubusercontent.com/60f2b2577187e1ceca976d6a9f7a457c657b20dbf85d7a76a3ac28e32e740eb6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e302d3843394342362e7376673f7374796c653d666c6174)[![Build Status](https://camo.githubusercontent.com/341aeaea367e7f372e90abc955391ecc9998d371593d2a638908d3cdac438ba3/68747470733a2f2f7472617669732d63692e6f72672f6d61646b6f6d2f506163742d5048502d436c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/madkom/Pact-PHP-Client)[![Coverage Status](https://camo.githubusercontent.com/cfe497ce873f6ef8a1b2ebd47bec1c26023536bdb22d921efe4f9c6604ce61f1/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d61646b6f6d2f506163742d5048502d436c69656e742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/madkom/Pact-PHP-Client?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/5a06839f0e000b6aeb059f566a4783df2ecdce16308557758dcf3f2bf71b4ddd/68747470733a2f2f706f7365722e707567782e6f72672f6d61646b6f6d2f706163742d7068702d636c69656e742f762f737461626c65)](https://packagist.org/packages/madkom/pact-php-client)[![Total Downloads](https://camo.githubusercontent.com/0f73a997d49c5a4acf2e4e0c495c91b458d3ffbe3f8c37896729f1914f660ef6/68747470733a2f2f706f7365722e707567782e6f72672f6d61646b6f6d2f706163742d7068702d636c69656e742f646f776e6c6f616473)](https://packagist.org/packages/madkom/pact-php-client)[![License](https://camo.githubusercontent.com/74e964cf0bbf05acf276cd7879cc67c78c5ac0e73d77d43496fc745b76c3335b/68747470733a2f2f706f7365722e707567782e6f72672f6d61646b6f6d2f706163742d7068702d636c69656e742f6c6963656e7365)](https://packagist.org/packages/madkom/pact-php-client)

### What is Pact

[](#what-is-pact)

Pact is [consumer driven contract](http://martinfowler.com/articles/consumerDrivenContracts.html). Is a way to define contract between consumers and provider.
It help to keep your provider's API compatible with your consumers.

### Pact-Php-Client

[](#pact-php-client-1)

Is client for [pact-mock-service](https://github.com/bethesque/pact-mock_service). Which is just implementation of [Ruby Pact](https://github.com/realestate-com-au/pact).
Your tests against provider can be run as part of your Continues Integration system.
For more information about how does Pact works go here [pact wiki](https://github.com/realestate-com-au/pact/wiki) and here for [microservices overview](http://dius.com.au/2016/02/03/microservices-pact)

### How to use Pact-Php-Client

[](#how-to-use-pact-php-client)

Examples can be found at [usages catalog](http://dius.com.au/2016/02/03/microservices-pact). For more information check above links.
If you don't want to host your own `pact-mock-service`, you can use our docker image (You need to have `docker-compose`).
To do so from the root catalog type in console `docker-compose up -d` and start examples `php usage/single-interaction.php`.

### License

[](#license)

The MIT License (MIT)

Copyright (c) 2016 Madkom S.A.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~79 days

Recently: every ~99 days

Total

6

Last Release

3392d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b6139b0dc15c550b22c76954ec6a96ac6c46b4c19b4a3c1e93c2146481e109e?d=identicon)[dgafka](/maintainers/dgafka)

![](https://www.gravatar.com/avatar/406fcac8020975863dc6ca1f7cf729eb9755911131bce696ba502218c0536be5?d=identicon)[Madkom](/maintainers/Madkom)

---

Top Contributors

[![dgafka](https://avatars.githubusercontent.com/u/6060791?v=4)](https://github.com/dgafka "dgafka (1 commits)")

---

Tags

clientmockserviceconsumercontractpactdrivenmadkom

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/madkom-pact-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/madkom-pact-php-client/health.svg)](https://phpackages.com/packages/madkom-pact-php-client)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M717](/packages/sylius-sylius)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69734.4M145](/packages/algolia-algoliasearch-client-php)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3845.9M27](/packages/gotenberg-gotenberg-php)[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

935572.3k2](/packages/mailerlite-laravel-elasticsearch)[php-http/mock-client

Mock HTTP client

7110.2M922](/packages/php-http-mock-client)

PHPackages © 2026

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