Skip to content

Support \VCR\VCR::configure()->setStorage #9

Closed
@GaryJones

Description

@GaryJones

In my bootstrap.php, I have:

VCR::configure()->setStorage('json');
VCR::configure()->enableLibraryHooks(['soap']);
VCR::configure()->setCassettePath('tests/fixtures/vcr');
VCR::turnOn();

However, when using this package, my choice of storage is not carried through. It looks to be down to:

        if (substr($cassetteName, '-5') == '.json') {
            \VCR\VCR::configure()->setStorage('json');
        } else {
            \VCR\VCR::configure()->setStorage('yaml');
        }

Changing it to something like

        if (substr($cassetteName, '-5') == '.json') {
            \VCR\VCR::configure()->setStorage('json');
        }

may allow it to pick up on the user choice.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions