PHPackages                             tienvx/pact-provider-bundle - 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. tienvx/pact-provider-bundle

ActiveSymfony-bundle[Testing &amp; Quality](/categories/testing)

tienvx/pact-provider-bundle
===========================

Pact Provider Bundle

v1.0.4(2y ago)155.0k↓64%1MITPHPPHP ^8.1

Since Mar 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/tienvx/pact-provider-bundle)[ Packagist](https://packagist.org/packages/tienvx/pact-provider-bundle)[ RSS](/packages/tienvx-pact-provider-bundle/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (5)Dependencies (6)Versions (6)Used By (0)

Pact Provider Bundle [![Build Status](https://github.com/tienvx/pact-provider-bundle/workflows/main/badge.svg)](https://github.com/tienvx/pact-provider-bundle/actions) [![Coverage Status](https://camo.githubusercontent.com/8bc22b80010b51486904331833770834e370d36aad81be944b4ce89166c1f355/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f7469656e76782f706163742d70726f76696465722d62756e646c652f62616467652e7376673f6272616e63683d6d61696e26736572766963653d676974687562)](https://coveralls.io/github/tienvx/pact-provider-bundle?branch=main) [![Version](https://camo.githubusercontent.com/6d48ad661f02f7e37ab7449ca71caaaf91544cd2df5f1a52d3d77dff38a63232/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7469656e76782f706163742d70726f76696465722d62756e646c652e7376673f7374796c653d666c6174)](https://packagist.org/packages/tienvx/pact-provider-bundle) [![PHP Version](https://camo.githubusercontent.com/d0940d9652b353227d92a43a0aa221f2ee3a317a7e29a2cb1af6013a18a9d922/687474703a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e312e302b2d6666363962342e737667)](https://packagist.org/packages/tienvx/pact-provider-bundle)
=========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#pact-provider-bundle----)

This Symfony Bundle allow testing Symfony project with [Pact PHP](https://github.com/pact-foundation/pact-php). It support:

- Verify sending messages
- Set up provider state
- Tear down provider state

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

[](#installation)

```
composer require tienvx/pact-provider-bundle
```

Documentation
-------------

[](#documentation)

### Register State Handler

[](#register-state-handler)

```
namespace App\StateHandler;

use Tienvx\Bundle\PactProviderBundle\Attribute\AsStateHandler;
use Tienvx\Bundle\PactProviderBundle\Model\StateValues;
use Tienvx\Bundle\PactProviderBundle\StateHandler\SetUpInterface;
use Tienvx\Bundle\PactProviderBundle\StateHandler\TearDownInterface;

#[AsStateHandler(state: 'A user with id dcd79453-7346-4423-ae6e-127c60d8dd20 exists')]
class UserHandler implements SetUpInterface, TearDownInterface
{
    public function setUp(array $params): ?StateValues
    {
        return new StateValues([
            'id' => 123,
        ]);
    }

    public function tearDown(array $params): void
    {
    }
}
```

### Register Message Dispatcher

[](#register-message-dispatcher)

```
namespace App\MessageDispatcher;

use Tienvx\Bundle\PactProviderBundle\Attribute\AsMessageDispatcher;
use Tienvx\Bundle\PactProviderBundle\Model\Message;
use Tienvx\Bundle\PactProviderBundle\MessageDispatcher\DispatcherInterface;

#[AsMessageDispatcher(description: 'User created message')]
class UserDispatcher implements DispatcherInterface
{
    public function dispatch(): ?Message
    {
    }
}
```

License
-------

[](#license)

[MIT](https://github.com/tienvx/pact-provider-bundle/blob/main/LICENSE)

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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 ~1 days

Total

5

Last Release

824d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/176d0199776bb6cdb210e2c5339ec79637c613e0617377378807bfe051eabb8e?d=identicon)[tien.xuan.vo](/maintainers/tien.xuan.vo)

---

Top Contributors

[![tienvx](https://avatars.githubusercontent.com/u/3327643?v=4)](https://github.com/tienvx "tienvx (134 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tienvx-pact-provider-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tienvx-pact-provider-bundle/health.svg)](https://phpackages.com/packages/tienvx-pact-provider-bundle)
```

PHPackages © 2026

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