Q: How do you use a trait with a non-static method that conflicts with an inherited static method? Say I have a trait and a class that each have a method with the same name, but the class's method is static and the trait's method is not. Is it possible to define a class that both inherits from this class and uses the trait?
In code, this would look something like
trait MyTrait
{
    public function doStuff()
    {
        return 'trait';
    }
}

class ParentClass
{
    public static function doStuff()
    {
        return 'parent';
    }
}

class ChildClass extends ParentClass // I'm feeling really original today apparently
{
    use MyTrait;
}

My first thought was to alias the method on the trait, like
class ChildClass extends ParentClass
{
    use MyTrait {
        doStuff as doOtherStuff;
    }
}

but it seems the trait is still trying to override the method from the parent class, so this throws an error
Cannot make static method ParentClass::doStuff() non static in class MyTrait

Is what I'm trying to do possible? If so, how? And if not, please explain why not. Thanks!
EDIT
Unfortunately, changing the method names isn't a viable option for me, since both the class and the trait are used pretty extensively around other parts of the application. According to the PHP docs, the trait's methods always override inherited methods. (You can see this at work if you change ParentClass::doStuff to be non-static, but that's not something I can feasibly do either.) Perhaps what I'm asking is really whether it's possible to make the trait's method not override the inherited static method (which seems to be the normal behavior)?
I also creating a second trait that aliases MyTrait::doStuff to doOtherStuff and using that instead.
trait MyTrait2
{
    use MyTrait {
        doStuff as doOtherStuff;
    }
}

class ChildClass extends ParentClass
{
    use MyTrait2;
}

But this produces the same error, which I find strange.
Cannot make static method ParentClass::doStuff() non static in class MyTrait2


A: It's probably a misconception. Static methods and non-static ones should not do the same kind of work so should have different names, Maybe your names are not explicit enough.
You cannot do it because, when you create an alias, both old name and new name exist. So as the "doStuff" still exists, it creates a conflict with the ParentClass.
See this example:
trait MyTrait
{
    public function doStuff()
    {
        return 'foo';
    }
}

class Foo
{
    use MyTrait {
        doStuff as doOtherStuff;
    }
}

echo Foo::doStuff(); // doStuff still works

