You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a class, that uses traits (which is compiler-assisted copy-paste), then PHP's built-in ReflectionClass object for that class will also return used trait constants/methods/properties as part of a class reflection object (trait method scope/name changes are accounted for).
This library doesn't return trait-provided data as part of class reflection, that uses them.
Class "MyHelloWorld":
Method public "sayWorld2" (local,)
Method public "sayHelloWorld" (local,)
Method protected "sayHelloProtected" (a_trait,)
Method public "sayHello" (a_trait,)
Method public "smallTalkTraitA" (a_trait,)
Method public "sayWorld" (b_trait,)
Method public "smallTalk" (b_trait,)
If I attempt to do the same using this library, then I'll only get class methods defined in itself (that has local, parameter).
If you have a class, that uses traits (which is compiler-assisted copy-paste), then PHP's built-in
ReflectionClass
object for that class will also return used trait constants/methods/properties as part of a class reflection object (trait method scope/name changes are accounted for).This library doesn't return trait-provided data as part of class reflection, that uses them.
Sample PHP code:
Here is the introspection code I've used:
Here is the introspection result:
If I attempt to do the same using this library, then I'll only get class methods defined in itself (that has
local,
parameter).Maybe it is related to the #54.
The text was updated successfully, but these errors were encountered: