Hello list.
Another potential benefit of such interfaces can be polyfills.
PHP 8.x: class ReflectionClass implements Reflector, AttributesHaving {..}
PHP 7.x. class UserlandReflectionClass extends ReflectionClass
implements AttributesHaving {..}
function f(AttributesHaving $reflector) {
On Tue, 1 Mar 2022 at 21:03, DANIEL VARGAS MUCCILLO
wrote:
>
> >
> > I *think* all Reflector children support attributes, so it may not need a
> > separate interface.
>
>
> ReflectionZendExtension and ReflectionExtension are currently the only ones
> who implement Reflector but don't support
>
> I have been considering a "clean up reflection's class hierarchy" RFC
> myself; things like getName() are also ubiquitous, but AFAICT is not
> actually in a common type definition anywhere.
>
I think a single RFC to clean up all the bits is probably the place to
> start. If any particular
On Tue, Mar 1, 2022, at 2:02 PM, DANIEL VARGAS MUCCILLO wrote:
>>
>> I *think* all Reflector children support attributes, so it may not need a
>> separate interface.
>
>
> ReflectionZendExtension and ReflectionExtension are currently the only ones
> who implement Reflector but don't support
>
> I *think* all Reflector children support attributes, so it may not need a
> separate interface.
ReflectionZendExtension and ReflectionExtension are currently the only ones
who implement Reflector but don't support attributes.
> However, the entire Reflection class hierarchy is a mess and
On Fri, Feb 25, 2022, at 4:57 PM, DANIEL VARGAS MUCCILLO wrote:
> Hi Internals, hope you are all well.
>
> I've been playing around with Attributes and found that the only
> way for safely type hint for reflection entities who implement the
> getAttributes method is the following union:
>
>
Hi Internals, hope you are all well.
I've been playing around with Attributes and found that the only
way for safely type hint for reflection entities who implement the
getAttributes method is the following union: