PHPackages                             arlauskas/cassette-generator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. arlauskas/cassette-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

arlauskas/cassette-generator
============================

Generate files for vcr cassette

v1.1.4(4y ago)036MITPHPPHP &gt;=7.4

Since Feb 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/dev-stone/cassette-generator)[ Packagist](https://packagist.org/packages/arlauskas/cassette-generator)[ RSS](/packages/arlauskas-cassette-generator/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (8)Dependencies (4)Versions (11)Used By (0)

Cassettes generator to generate [PHP-VCR](https://php-vcr.github.io/) cassettes
===============================================================================

[](#cassettes-generator-to-generate-php-vcr-cassettes)

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

[](#installation)

```
composer require --dev arlauskas/cassette-generator
```

Usage
-----

[](#usage)

```
vendor/bin/vcg vcg_config.yaml
```

Configuration example
---------------------

[](#configuration-example)

### vcg\_config.yaml

[](#vcg_configyaml)

```
record-defaults:
    request:
        method: POST
        url: "'http://127.0.0.1:8080/soap'"
        headers:
            Host: "'127.0.0.1:8080'"
            Content-Type: "'text/xml; charset=utf-8;'"
            SOAPAction: "'http://tempuri.org/'"
    response:
        status:
            http_version: "'1.1'"
            code: "'200'"
            message: OK
        headers:
            Cache-Control: private
            Content-Length: "'196'"
            Content-Type: "'text/xml; charset=utf-8'"
            Server: Microsoft-IIS/8.0
            X-AspNet-Version: 4.0.30319
            X-Powered-By: ASP.NET
            Date: "'Wed, 10 Feb 2021 07:35:56 GMT'"
cassettes-settings:
    -
        name: 'integration_tests'
        input-dir: './assets/'
        output-dir: './output/'
        cassettes:
            -
                output-file: 'login_process.yaml'
                records:
                    -
                        request: 'find_user_request.xml'
                        response: 'find_user_response.xml'
                        append:
                            'request|headers|SOAPAction': 'IAppService/FindUser'
                        rewrite:
                            'response|headers|Date':
                    -
                        request: 'user_login_request.xml'
                        response: 'user_login_response.xml'
                        append:
                            'request|headers|SOAPAction': 'IAppService/Login'
                        rewrite:
                            'response|headers|Date':
            -
                output-file: 'registration_process.yaml'
                records:
                    -
                        request: 'check_code_request.xml'
                        response: 'check_code_response.xml'
                        append:
                            'request|headers|SOAPAction': 'IAppService/CheckCode'
                        rewrite:
                            'response|headers|Date':
                    -
                        request: 'pass_code_request.xml'
                        response: 'pass_code_response.xml'
                        append:
                            'request|headers|SOAPAction': 'IAppService/PassCode'
                        rewrite:
                            'response|headers|Date':
```

### find\_user\_request.xml

[](#find_user_requestxml)

```

            test@example.com

```

### find\_user\_response.xml

[](#find_user_responsexml)

```

            true

```

Config reference
----------------

[](#config-reference)

### record-defaults

[](#record-defaults)

In every record will be provided default information.

### cassettes-settings

[](#cassettes-settings)

Here you will provide configuration how your files structure will look like. Cassette will be written into files and every will have one or more records. `record-defaults` data will be provided into every record.

`request` and `response` will try to look files from `input-dir` from cassettes holder.

`append` will add data provided by `record-defaults` settings.

`rewrite` will replace data provided by `record-defaults` settings.

Every cassette will be written to directory `output-dir` and named by `output-file`.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86% 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 ~42 days

Recently: every ~1 days

Total

9

Last Release

1572d ago

Major Versions

v0.0.2 → 1.0.12021-02-18

PHP version history (2 changes)1.0.0PHP &gt;=7.4

v1.1.0PHP ^7.4 || ^8.0 || ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/00a72dbee6a90cde208207f1cc22d803479c2cc1b4f24ba0eadf1de0ac721d94?d=identicon)[arlauskas](/maintainers/arlauskas)

---

Top Contributors

[![arlauskas](https://avatars.githubusercontent.com/u/17720529?v=4)](https://github.com/arlauskas "arlauskas (37 commits)")[![kestutis-ito](https://avatars.githubusercontent.com/u/71599288?v=4)](https://github.com/kestutis-ito "kestutis-ito (6 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/arlauskas-cassette-generator/health.svg)

```
[![Health](https://phpackages.com/badges/arlauskas-cassette-generator/health.svg)](https://phpackages.com/packages/arlauskas-cassette-generator)
```

###  Alternatives

[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41716.4k2](/packages/lullabot-drainpipe)[netgen/content-browser

Netgen Content Browser is a Symfony bundle that provides an interface which selects items from any kind of backend and returns the IDs of selected items back to the calling code.

14112.1k8](/packages/netgen-content-browser)

PHPackages © 2026

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