Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[PHP] "Go to Declaration"/"Ctrl + B" improvement

Abierto
#9,626 2 comentarios 3 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
65/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
php
Área
devtools

Línea de trabajo

Reproduce the PHP editor's "Go to Declaration" behavior using the project class and the duplicate class in an Include Path helper file. Start by tracing PHP declaration resolution for Ctrl+B, then verify that the project declaration is selected before the external helper declaration while autocompletion still works.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

kind:bug needs:triage PHP
Apache NetBeans version

Apache NetBeans 31

What happened

When using the "Include Path" option to add "ide-helper" files for autocompletion, some classes end up duplicated on those extra files, it has same clases with PHPDoc annotations.
Everything works fine, but when I use Ctrl + B (or "Go to Declaration") on a class, it takes me to the external helper file instead of the actual class within the project.
Is there a way to ensure that if a class exists within the project, it takes precedence over the classes in the "Include Path" files (which are intended solely for autocompletion)?

Language / Project Type / NetBeans Component

PHP

How to reproduce

File within the project

// App/MyCustomClasss.php
namespace App{
   class MyCustomClasss{}
}

same text on a "Include Path" directory/file

// extra_files/helper.php
namespace App{
  /**
   * @property int $id
   * /
  class MyCustomClasss{}
}

Now, in another file within the project.

$obj = new MyCustomClasss(); 
// here "Go to Declaration" on MyCustomClasss
// it opens `extra_files/helper.php` but `App/MyCustomClasss.php` one should take priority
Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows

JDK

latest

Apache NetBeans packaging

Community provided installer

Anything else

I tried using @mixin with a different name for the class, but the class allows for multiple concatenations, and using @mixin causes the reference to the class to be lost after the second level of concatenation.

Are you willing to submit a pull request?

No

Lenguaje dominante
Java
Estrellas
3.1k
Forks
939
Merge medio
4 d 20 h
PR fusionados (30 d)
25

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/netbeans

Todos los issues de apache/netbeans

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.