Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

rename not working

未关闭
#143 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
php
领域
tooling

调研方向

首先复现报告中的重命名情况:从 $logger 的声明处以及从 $this->logger 将 $logger 重命名为 $_logger,然后在方法参数与成员 cache 同名时重命名成员 cache。完成的标准是更新 accessor 和成员引用,同时不更改无关参数,并且报告的 MemberAccessExpression 错误不再发生;issue 中未指定任何文件或测试路径。

由索引模型根据 Issue 内容生成。

描述

upstream

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

主要语言
Emacs Lisp
星标
47
派生
11
平均合并
12 分钟
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

emacs-php/phpactor.el 的其他 Issue

查看 emacs-php/phpactor.el 的全部 Issue

相似的 Issue

更多 DevTools Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。