Closed
Closed
Copy link
Description
Symfony version(s) affected: 5.1.0+
Description
There's a class with method hasProvince(Province $province): bool
which checks whether a given province exists in a list.
Calling ReflectionExtractor::isReadable($class, 'province')
returns different results:
- in Symfony 4.4 and 5.0:
false
- there's a check that requires this has* method to require 0 arguments - in Symfony 5.1 and higher:
true
- that check is missing
How to reproduce
I've created a reproduced in this repository: https://github.com/pamil/SymfonyPropertyInfoReproducer
There's a test.php
file that performs a few assertions and GitHub Actions set up which show that the BC break exists:
https://github.com/pamil/SymfonyPropertyInfoReproducer/actions/runs/494310508
Possible Solution
I guess bringing back that check to isReadable
- but I'm not sure what that 5.0 -> 5.1 refactor was for so I don't understand how it works yet.