PHPUnit 11 has deprecated annotations that can be used in special PHP comments to add metadata to test classes and test methods in favour of attributes. While both are still supported, the listener will first check if the attribute is set (#[Vcr('fixture/cassette.json')]), and then check the annotations as a fallback (/** @vcr fixture/cassette.json **/).
PHPUnit 11 has deprecated annotations that can be used in special PHP comments to add metadata to test classes and test methods in favour of attributes. While both are still supported, the listener will first check if the attribute is set (
#[Vcr('fixture/cassette.json')]
), and then check the annotations as a fallback (/** @vcr fixture/cassette.json **/
).