sebastianbergmann/type

Support Disjunctive Normal Form types

sebastianbergmann opened this issue · 0 comments

PHP 8.2 adds support for Disjunctive Normal Form Types:

This RFC does not introduce any new reflection classes. However, it does make one change to the Reflection API, in that ReflectionUnionType::getTypes() previously was guaranteed to always return an array of ReflectionNamedType instances. Now it will return some combination of ReflectionNamedType and ReflectionIntersectionType instances. The method is already typed to return ReflectionType so this is not an API change, but the previous de facto assumption is no longer valid.