Bug #74939 [Opn]: Nested traits' methods are lowercased

From: Date: Mon, 17 Jul 2017 15:06:25 +0000
Subject: Bug #74939 [Opn]: Nested traits' methods are lowercased
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210090@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74939&edit=1 ID: 74939 Updated by: requinix@php.net Reported by: jakub at chabek dot cz -Summary: ReflectionMethod:getName returns incorrect case when nesting traits +Summary: Nested traits' methods are lowercased Status: Open Type: Bug -Package: Reflection related +Package: Scripting Engine problem -Operating System: linux, probably irrelevant +Operating System: Irrelevant PHP Version: Irrelevant Block user comment: N Private report: N New Comment: The lowercasing is happening in the engine - reflection is working correctly. Showing all methods: https://3v4l.org/gqENX T1's method is lowercased while T2's is not. Previous Comments: ------------------------------------------------------------------------ [2017-07-17 11:45:28] jakub at chabek dot cz 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" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74939&edit=1

« previous php.bugs (#210090) next »