Skip to content

Renaming class renames self #91

@calebdw

Description

@calebdw

PHPantom version

phpantom_lsp 6714db0

Installation method

Built from source

Operating system

Linux x86_64

Editor

Neovim

Bug description

Hello! When renaming a class, instances of self or static should NOT be renamed:

Steps to reproduce

enum WorkflowTemplateStatus: int
{
    use Arrayable;
    use HasLabelAttribute;

    case Draft    = 0;
    case Active   = 1;
    case Inactive = 2;

    public function isActive(): bool
    {
        return $this === self::Active;
    }
}
  • rename the enum, and observe that self:: is updated

Error output or panic trace


.phpantom.toml

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions