Skip to content

Function/Method code completion suggest invalid symbols #126

@DarkGhostHunter

Description

@DarkGhostHunter

PHPantom version

0.8-dirty

Installation method

Zed extension (auto-downloaded)

Operating system

Linux x86_64

Editor

Zed

Bug description

When using textDocument/Completion, the LSP suggest invalid symbols to complete: Class names, constants, anything else.

The LSP Should only offer valid symbols for completion, which should only be:

  1. Methods to be overridden from the parent.
  2. Methods for methods calls that do not exist yet.
  3. Methods pending implementation for the interface or abstract method (if it matches visibility).
  4. Methods that may exist (method_exist calls that reference the object or context)
Image Image

Steps to reproduce

  1. Create a class
  2. create a method
  3. See the autocompletion for the function with invalid symbols.

Error output or panic trace


.phpantom.toml

default

Additional context

Laravel 13.x Framework

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions