Bug report
We use PHPStan with two PHP versions. With the latest 8.1 and the older 7.2. If we use the annotation ReturnTypeWillChange, then PHPStan running on PHP 7.2 reports the error Reflection error: Attribute not found. But when we remove the annotation then it reports an error with PHP 8.1.
Code snippet that reproduces the problem
Link with the code.
Expected output
No error on PHP 7.1 - 7.4