Now that the mailing list is working again I'd like to propose some
improvements to the ReflectionType API. We added ReflectionType as
part of the Return Types RFC. At that time the API was intentionally
kept minimal to not step on the toes of potential future features
(such as enum, union and intersection types) with the intention of
fleshing it out later. As long as the release managers for 7.1 are
okay with it I'd like to do these improvements now. Shall I move
forward with an RFC or do you consider this too late?

The proposed API looks like this:
https://gist.github.com/morrisonlevi/5819a2b8d86561849ee916a7bcbc9c29.
Notably a `ReflectionClassType` will be returned if possible which has
a `getClass(): ReflectionClass` method. This has been a commonly
requested addition and simplifies a common use-case.

I tried to discuss these changes on Reddit to gauge community impact
but it had few responses:
https://www.reddit.com/r/PHP/comments/4m93s1/i_want_to_enhance_and_break_the_reflectiontype/.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to