tienvx/laravel-pact-provider
Pact Provider integration for Laravel
1,465
1
Larablocks Analysis
tienvx/laravel-pact-provider works with Laravel 10 and 11 (latest release v0.2.0, Apr 1, 2024), all past end of life (the last on Mar 12, 2026): no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 10 and 11, past end of life since Mar 12, 2026
- No release in the last 12 months (last: Apr 1, 2024)
- 0 downloads a month (needs 10,000)
- 1 GitHub star (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Apr 1, 2024.
- No releases in the last 12 months.
- First released: Apr 1, 2024.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 30, 2026.
| Install | |
|---|---|
composer require tienvx/laravel-pact-provider |
|
| Latest Version: | v0.2.0 |
| PHP: | ^8.1 |
| Laravel: | 10 · 11 |
| License: | MIT |
| Last Updated: | Apr 1, 2024 |
| Links: | GitHub · Packagist |
Maintainer: tien.xuan.vo
Pact Provider Package

This Laravel Package allow testing Laravel project with Pact PHP. It support:
- Verify sending messages
- Set up provider state
- Tear down provider state
Installation
composer require tienvx/laravel-pact-provider
Documentation
Register State Handler
namespace App\StateHandler;
use Tienvx\PactProvider\Attribute\AsStateHandler;
use Tienvx\PactProvider\Model\StateValues;
use Tienvx\PactProvider\StateHandler\SetUpInterface;
use Tienvx\PactProvider\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
{
}
}
app()->bind(UserHandler::class);
Register Message Dispatcher
namespace App\MessageDispatcher;
use Tienvx\PactProvider\Attribute\AsMessageDispatcher;
use Tienvx\PactProvider\Model\Message;
use Tienvx\PactProvider\MessageDispatcher\DispatcherInterface;
#[AsMessageDispatcher(description: 'User created message')]
class UserDispatcher implements DispatcherInterface
{
public function dispatch(): ?Message
{
}
}
app()->bind(UserDispatcher::class);
License
Related Packages
studio-design/gesso
Gesso — OpenAPI 3.0/3.1/3.2 contract testing for PHP. Framework-independent core...
46,690
10
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
670,032,257
9,703
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
465,816,364
607
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v0.2.0 | ^8.1 | ^10| | MIT | |
| v0.1.0 | ^8.1 | ^10| | MIT |