If, for instance, the test doesn't have a @vcr annotation, that value (from array_pop($parsed)) may be null. This causes a TypeError due to the strict_types declaration.
Probably could be fixed by moving the empty($cassetteName) check before the check for a .json extension.
https://github.com/php-vcr/phpunit-testlistener-vcr/blob/7ef72250d99e6cacf9cca8670b8884bc936c1842/src/VCRTestListener.php#L49-L51
If, for instance, the test doesn't have a
@vcr
annotation, that value (fromarray_pop($parsed)
) may be null. This causes aTypeError
due to thestrict_types
declaration.Probably could be fixed by moving the
empty($cassetteName)
check before the check for a.json
extension.https://github.com/php-vcr/phpunit-testlistener-vcr/blob/7ef72250d99e6cacf9cca8670b8884bc936c1842/src/VCRTestListener.php#L53-L55