|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-07-17 15:06 UTC] requinix@php.net
-Summary: ReflectionMethod:getName returns
incorrect case when nesting traits
+Summary: Nested traits' methods are
lowercased
-Package: Reflection related
+Package: Scripting Engine problem
-Operating System: linux, probably irrelevant
+Operating System: Irrelevant
[2017-07-17 15:06 UTC] requinix@php.net
[2017-07-17 15:06 UTC] requinix@php.net
-Summary: Nested traits' methods are lowercased
+Summary: Nested traits' aliased methods are lowercased
[2020-03-02 20:01 UTC] nikic@php.net
-Assigned To:
+Assigned To: nikic
[2020-03-03 10:57 UTC] nikic@php.net
-Status: Assigned
+Status: Closed
[2020-03-03 10:57 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 02:00:01 2025 UTC |
Description: ------------ Reflection API returns lower case method name when multiple traits are nested. Test script: --------------- trait TraitA { function sameName() {} } trait TraitB { use TraitA {sameName as someOtherName;} function sameName() {} } class SomeClass { use TraitB {sameName as yetAnotherName;} function sameName() {} } $reflection = new \ReflectionClass(SomeClass::class); var_dump($reflection->getMethod('someOtherName')->getName()); Expected result: ---------------- string(13) "someOtherName" Actual result: -------------- string(13) "someothername"