Skip to content

Property rename does not work when using a Trait reference #9915

Description

@LordSimal

Bug Report

Subject Details
Rector version 2.6.7

When trying to rename a property of a trait (or a class using a trait) it does not properly rename all usages of that property across all classes, which use that trait.

I am aware, that the trait itself does not declare that property, but even in that case, that the trait declares the property, it does not adjust the code in the classes using that trait - see 2nd link bellow.

Minimal PHP Code Causing Issue

https://getrector.com/demo/75c22395-173b-464c-bb68-eff51818f48b

and

https://getrector.com/demo/9039d70d-7fee-4d07-bc33-44115480b37c

Expected Behaviour

Properties being renamed via a trait reference should also rename properties and its usages in all classes, which use the trait.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions