|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2020-09-12 15:24 UTC] beberlei@php.net
-Assigned To:
+Assigned To: beberlei
[2020-11-14 21:17 UTC] carusogabriel@php.net
[2021-07-07 10:42 UTC] git@php.net
[2021-07-07 10:42 UTC] git@php.net
-Status: Assigned
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
Description: ------------ The new ReflectionAttribute class does not implement the Reflector interface. This is not really a big problem, but feels inconsistent and somewhat unintended. Test script: --------------- <?php $classes = [ 'ReflectionClass', 'ReflectionClassConstant', 'ReflectionZendExtension', 'ReflectionExtension', 'ReflectionFunction', 'ReflectionFunctionAbstract', 'ReflectionMethod', 'ReflectionNamedType', 'ReflectionObject', 'ReflectionParameter', 'ReflectionProperty', 'ReflectionType', 'ReflectionAttribute', ]; foreach ($classes as $class) { $isReflector = class_implements($class, 'Reflector') ? 'yes' : 'no'; $class = str_pad($class, 30); echo "$class$isReflector\n"; } Expected result: ---------------- ReflectionClass yes ReflectionClassConstant yes ReflectionZendExtension yes ReflectionExtension yes ReflectionFunction yes ReflectionFunctionAbstract yes ReflectionMethod yes ReflectionNamedType yes ReflectionObject yes ReflectionParameter yes ReflectionProperty yes ReflectionType yes ReflectionAttribute yes Actual result: -------------- ReflectionClass yes ReflectionClassConstant yes ReflectionZendExtension yes ReflectionExtension yes ReflectionFunction yes ReflectionFunctionAbstract yes ReflectionMethod yes ReflectionNamedType yes ReflectionObject yes ReflectionParameter yes ReflectionProperty yes ReflectionType yes ReflectionAttribute no