Suggestion: Remove `TypesFinder`
kukulich opened this issue · 1 comments
kukulich commented
- We did not improve the feature in last years
- There is support only for union types, no intersection types: https://github.com/Roave/BetterReflection/blob/5.0.x/src/TypesFinder/FindPropertyType.php#L57
- The library does not support generic or array shapes - we also have tests it does not work: https://github.com/Roave/BetterReflection/blob/5.0.x/test/unit/TypesFinder/FindPropertyTypeTest.php#L37
- Users can easily do it by themselves - methods
getAst()
andgetDocComment()
are public
So we don't support parsing of complex types and the support of parsing simple types is less useful with native types.
What do you think?
Ocramius commented
IMO the whole type parsing (for docblocks) should really happen in phpDocumentor/
, psalm/
or phpstan/
libraries here, yes.