Skip to content

Go to usages only works if no subclasses defined #389

Description

@EranNL

Verified on latest main

  • I have confirmed this bug still occurs when built from the latest main branch.

PHPantom version / commit

phpantom_lsp 7d7bbf7

Installation method

Built from source

Operating system

macOS aarch64 (Apple Silicon)

Editor

PHPStorm

Bug description

The following example:

Image I want to be able to see where this class is used. When I put my marker on the class and type Command + B (go to definition), the editor navigates to where `ServiceEntityRepository` lives.

When I remove all subclasses, the editor works as expected:

Image

This is the case for both Zed and Phpstorm (at least, these are the ones I tested), at first I thought it had something to do with the LSP server plugin I am using in PHPstorm (LSP4IJ), but Zed has exactly the same problem when using PHPantom as described in the docs:

Schermopname.2026-08-24.om.22.35.28.mov

Disabling phpantom makes the editors behave as expected (check usage and declaration of the class, extended class or implemented class).

Steps to reproduce

  1. Have a class extends another class.
  2. Try to check where the sub class is used.

Error output or panic trace


.phpantom.toml

#:schema https://github.com/PHPantom-dev/phpantom_lsp/raw/main/config-schema.json

# PHPantom configuration: only add settings you want to override.
# Editors with TOML schema support (Zed, VS Code + Even Better TOML, Neovim)
# provide autocomplete and hover documentation for all available options.
# Full reference: https://phpantom-dev.github.io/phpantom_lsp/configuration/

[diagnostics]
workspace = true

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions