emacs-php / emacs-php/phpactor.el

rename not working

Open
#143 2 comments 0 reactions 0 assignees View on GitHub
upstream
Dominant language
Emacs Lisp
Stars
47
Forks
11
PR merge metrics
No merged PRs in 30d

Description

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](https://user-images.githubusercontent.com/362891/72131814-a6c3cd80-337d-11ea-9dff-6ee639796eeb.png)

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](https://user-images.githubusercontent.com/362891/72132152-8d6f5100-337e-11ea-9d92-188aeff50441.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.