Not all public properties in Adapter namespace work correctly
ondrejmirtes opened this issue · 1 comments
ondrejmirtes commented
There's currently an unset
+ __get
hack for ReflectionClass::$name
:
BetterReflection/src/Reflection/Adapter/ReflectionClass.php
Lines 46 to 53 in c834c79
We need to do a similar hack for other public properties. There's about 12 of them judging from https://github.com/JetBrains/phpstorm-stubs/tree/master/Reflection.
Otherwise we can get errors like Error: Typed property ReflectionParameter::$name must not be accessed before initialization
.
Originally reported: phpstan/phpstan#7428
Ocramius commented
Urgh, public properties @_@