Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename not working #143

Open
rileyrg opened this issue Jan 10, 2020 · 2 comments
Open

rename not working #143

rileyrg opened this issue Jan 10, 2020 · 2 comments
Labels

Comments

@rileyrg
Copy link

rileyrg commented Jan 10, 2020

rename doesn't seem to work properly - it doesn't recognise accessors/getters or the member data within them. eg here I rename member variable $logger to $_logger both locally and "in file" - neither correctly updates the logger() method.

Screenshot from 2020-01-10 07-47-04

Here I tried renaming from the declaration. Trying to rename from an "$this->logger" results in:-

user-error: Expected Variable or Parameter node, got
"Microsoft\PhpParser\Node\Expression\MemberAccessExpression"

Possibly the worst problem though is renaming a member variable that has parameters named after it. eg here I rename member var "cache" to "cache2" and it renames method parameters in that class and not the actual member variable usages.

Screenshot from 2020-01-10 07-53-29

@zonuexe
Copy link
Member

zonuexe commented Jan 21, 2020

@rileyrg Thanks for the report.

However, this problem is due upstream (Phpactor and Tolerant PHP Parser). Submitting minimal code that reproduces this problem will help us resolve the cause.

@rileyrg
Copy link
Author

rileyrg commented Jan 21, 2020

There is no code. Its simply trying to rename using the php actor interface. See screenshot. The second part suggests a real issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants