Re: [RFC][Vote] ReflectionType Improvements
| From: | Aaron Piotrowski | Date: | Mon, 11 Jul 2016 16:30:27 +0000 |
| Subject: | Re: [RFC][Vote] ReflectionType Improvements | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-94471@lists.php.net to get a copy of this message | ||
Hi Levi,
> On Jul 9, 2016, at 10:12 AM, Levi Morrison <levim@php.net> wrote:
>
> On Sat, Jul 9, 2016 at 8:16 AM, Aaron Piotrowski <aaron@trowski.com
> <mailto:aaron@trowski.com>> wrote:
>>
>>
>> Additionally, I propose adding a getName() method to ReflectionType that returns only the
>> name of the type, regardless of nullability. Casting should not be required to get information from
>> an object, but currently this is the only way to get the type name from ReflectionType. Most other
>> reflection classes include a getName() method, this seems to have been an oversight.
>
> This wasn't an oversight. If we add union or intersection types then
> not all types are named (for instance `ArrayAccess & Countable &
> Traversable` is not a named type). This is why it doesn't exist on the
> base ReflectionType.
Good point, then I agree getName() should be in an extending class as in the RFC.
>
> I have surveyed some of the people who have voted no. Their reasons
> vary but based on these conversations it seems to me that by dropping
> ReflectionClassType and the associated autoloading mechanism that
> overall we'd be happier. I do agree with Aaron that at least *some*
> changes really need to go into 7.1. How do people feel about my
> proposal to just drop autoloading and
ReflectionClassType?
This sounds reasonable to me.
Aaron Piotrowski