Bug #63911 [Com]: Ignore conflicting trait methods originationg from identical sub traits

From: Date: Wed, 29 Oct 2014 17:15:29 +0000
Subject: Bug #63911 [Com]: Ignore conflicting trait methods originationg from identical sub traits
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188364@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63911&edit=1 ID: 63911 Comment by: gaetane dot le dot grange at gmail dot com Reported by: bitluni at bitluni dot net Summary: Ignore conflicting trait methods originationg from identical sub traits Status: Verified Type: Bug Package: Class/Object related Operating System: debian PHP Version: 5.4.10 Block user comment: N Private report: N New Comment: I went into some detail here: http://stackoverflow.com/questions/20382202/php-trait-method-conflicts-trait-inheritance-and-trait-hierarchies Previous Comments: ------------------------------------------------------------------------ [2014-10-29 16:08:01] jpauli@php.net Can someone explain me what you expect as a result ? For me, this is the right behavior, the engine has no way of differenciating between B::a() and C::A() , you have to help it using 'insteadof' ------------------------------------------------------------------------ [2013-12-07 08:31:24] gaetaneislockedoutof at gmail dot com I have this issue. It makes me very sad :'( Windows 7 Home Premium Edition Service Pack 1, 64bit PHP 5.5.6 / Apache/2.4.7 (Win32) ------------------------------------------------------------------------ [2013-09-19 09:17:53] gron@php.net This is indeed a bug. Unfortunately, this case slipped and did not get tested. It is a perfectly valid usecase, and should not require the use of insteadof at all. Best regards Stefan ------------------------------------------------------------------------ [2013-09-15 17:23:42] heruan at aldu dot net insteadOf in this case is just a workaround, since there is nothing to 'use instead of' something else because here there is a property/method conflicting with its very self! And BTW insteadOf cannot be used as a workaround with properties. ------------------------------------------------------------------------ [2013-05-03 10:26:44] simon at simon dot geek dot nz This is still occurring with PHP 5.5, commit cbe2870b72c4cfdb5c295e83c88d7cff5c39e396 (Fri May 3 12:25:49 2013 +0400). Not being able to use multiple traits that have the same trait somewhere in their composition trees is a rather major limitation of the trait system. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=63911 -- Edit this bug report at https://bugs.php.net/bug.php?id=63911&edit=1

« previous php.bugs (#188364) next »