php-http/vcr-plugin

Record your test suite's HTTP interactions and replay them during future test runs.

Package info

github.com/php-http/vcr-plugin

Homepage

pkg:composer/php-http/vcr-plugin

Statistics

Installs: 315 193

Dependents: 12

Suggesters: 1

Stars: 21

Open Issues: 0

1.2.4 2025-12-10 14:39 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT bf179c6132a1b16fe597d35fa047d29d29b373a2

  • Gary PEGEOT <garypegeot.woop@gmail.com>

httppluginpsr7vcr

This package is auto-updated.

Last update: 2026-06-10 15:47:15 UTC


README

👁 Latest Version
👁 Software License
👁 Build Status
👁 Code Coverage
👁 Quality Score
👁 Total Downloads

Record your test suite's HTTP interactions and replay them during future test runs.

Install

Via Composer

$ composer require --dev php-http/vcr-plugin

Usage

<?php

use Http\Client\Plugin\Vcr\NamingStrategy\PathNamingStrategy;
use Http\Client\Plugin\Vcr\Recorder\FilesystemRecorder;
use Http\Client\Plugin\Vcr\RecordPlugin;
use Http\Client\Plugin\Vcr\ReplayPlugin;

$namingStrategy = new PathNamingStrategy();
$recorder = new FilesystemRecorder('some/dir/in/vcs'); // You can use InMemoryRecorder as well

// To record responses:
$record = new RecordPlugin($namingStrategy, $recorder);

// To replay responses:
$replay = new ReplayPlugin($namingStrategy, $recorder);

Testing

$ composer test
$ composer test-static

Contributing

Please see our contributing guide.

Security

If you discover any security related issues, please contact us at security@php-http.org.

License

The MIT License (MIT). Please see License File for more information.