> Le 25 mars 2026 à 08:37, Robert Humphries <[email protected]> a 
> écrit :
> 
> it isn't documented why it only returns traits on the current class


The reason is given here: https://bugs.php.net/bug.php?id=61554#1333085728 :

Traits are outside the inheritance system: the 
parent class is effectively defined by the composition of its own 
methods/properties and any traits it uses, so trait usage is not actually 
inherited. Furthermore, it doesn't really make sense to reflect trait usage 
down 
the class hierarchy because the same trait may be used more than once within a 
class hierarchy.


—Claude

Reply via email to