Attributes in ReflectionMethod::__toString

From: Date: Tue, 26 Jan 2021 19:05:17 +0000
Subject: Attributes in ReflectionMethod::__toString
Groups: php.internals 
Request: Send a blank email to internals+get-112999@lists.php.net to get a copy of this message
Hi internals, while debugging a cache issue in Symfony (https://github.com/symfony/symfony/issues/39988), I noticed that e.g. ReflectionMethod::__toString() does not give any information about attributes on that method. The same applies to ReflectionClass and ReflectionProperty. But docblock comments are included in the string representation of ReflectionClass and ReflectionMethods (but not ReflectionProperty?). https://3v4l.org/U1vT0 I also noticed that ReflectionAttribute does not have a __toString() method and cannot be casted to string, while other Reflection classes can be casted to string. I do not know much about the PHP internals, but this looks quite inconsistent for me. Is there a reason for this or are attributes missing in the string representations? Kind regards, Markus

« previous php.internals (#112999) next »