Edit report at https://bugs.php.net/bug.php?id=63911&edit=1
ID: 63911
User updated by: bitluni at bitluni dot net
Reported by: bitluni at bitluni dot net
Summary: Ignore conflicting trait methods originationg from
identical sub traits
Status: Open
Type: Feature/Change Request
Package: Class/Object related
Operating System: debian
PHP Version: 5.4.10
Block user comment: N
Private report: N
New Comment:
same issue for properties
Previous Comments:
------------------------------------------------------------------------
[2013-01-05 18:27:56] bitluni at bitluni dot net
Description:
------------
When extracting traits I would like to extract some general functions into sub
traits and 'use' them in the traits where needed.
But when I compose a class out of multiple traits with sub traits I have to do
obsolete statements regardless if the colliding methods originate from same sub
trait.
Just add a check if a method collides with itself
Test script:
---------------
trait A
{
public function a(){}
}
trait B
{
use A;
}
trait C
{
use A;
}
class D
{
use B, C;
}
Actual result:
--------------
Fatal error: Trait method a has not been applied, because there are collisions
with other trait methods on D in
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63911&edit=1