Skip to content
P

PHP VCR

Record your test suite's HTTP interactions

by php-vcrFree

#1848in Developer Tools
0In stores

Description

PHP-VCR is a port of the Ruby VCR library to PHP. It records the HTTP interactions made by your test suite and replays them on later runs, s…

Highlights

  • Records and replays HTTP requests in tests
  • Supports stream wrappers, curl and SOAP
  • Configurable request matching
  • Cassettes stored as YAML or JSON
  • Four record modes
  • Installs with Composer

Ratings & Reviews

No ratings yet

Be the first to rate PHP VCR.

People also visit

T

test-proxy-recorder

VCR-style record & replay for Playwright testing

Developer Tools
Launch
P

Pollyjs

Record, Replay, and Stub HTTP Interactions

Developer Tools
Launch
M

MockServer

Easy mocking of any system you integrate with via HTTP or HTTPS

Developer Tools
Launch
D

DevTools

Local-first API workflows that go from HAR file to GitHub Actions in 60 seconds

Developer Tools
Launch
H

Hurl

Run and Test HTTP Requests

Developer Tools
Launch
H

HTTP Toolkit

HTTP(S) debugging proxy, analyzer, and client

Developer Tools
Launch

PHP VCR FAQ

What is PHP-VCR?

A PHP port of the Ruby VCR library that records HTTP interactions during tests and replays them on later runs.

Why use it?

Replayed tests are faster and more deterministic, and they do not need a live network connection.

Which HTTP libraries does it support?

PHP stream wrappers, the curl extension and SoapClient. All three hooks are enabled by default when you call VCR::turnOn().

What do I need?

PHP 8 and the curl extension, plus a few Composer packages that Composer installs for you.

What happens if I forget a cassette?

VCR throws immediately instead of silently calling the network.

What are the best PHP VCR alternatives?

Popular alternatives to PHP VCR include test-proxy-recorder, Pollyjs and MockServer. See all PHP VCR alternatives

Developer Stuff

Badges