-
-
Notifications
You must be signed in to change notification settings - Fork 737
Closed
rectorphp/rector-src
#6942Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-main |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/246236c7-2daa-4aad-ba2f-1610d6e0b7f4
<?php
trait MyTrait
{
public function _test()
{
return 'trait';
}
}
class DemoFile
{
use MyTrait;
public function _test()
{
return 'overwritten';
}
}Responsible rules
RenameMethodRector
Expected Behavior
Refs: rectorphp/rector-src#6928
In my PR it seems I haven't tested it correctly, since it just renames the methods inside classes which use the trait but not the trait method itself.
I would expect the config to also rename the trait method itself as well