-
Notifications
You must be signed in to change notification settings - Fork 877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PHP] Enum method not found #8286
Milestone
Comments
NReib
added a commit
to NReib/netbeans
that referenced
this issue
Mar 4, 2025
…name -Accessing a Constant of an Enum/Class now uses FQ name if possible Example: namespace test; enum TestA{ case X; public function get(string $param): string{ return ''; } } namespace test2; enum TestB{ case X; public function get(): string{ return ''; } } \test\TestA::X->get();
NReib
added a commit
to NReib/netbeans
that referenced
this issue
Mar 5, 2025
…name -Accessing a Constant of an Enum/Class now uses FQ name if possible Example: ```php namespace test; enum TestA{ case X; public function get(string $param): string{ return ''; } } namespace test2; enum TestB{ case X; public function get(): string{ return ''; } } \test\TestA::X->get('xxx'); // go to declaration and mark occurences do not work ```
NReib
added a commit
to NReib/netbeans
that referenced
this issue
Mar 6, 2025
…name -Accessing a Constant of an Enum/Class now uses FQ name if possible Example: ```php namespace test; enum TestA{ case X; public function get(string $param): string{ return ''; } } namespace test2; enum TestB{ case X; public function get(): string{ return ''; } } \test\TestA::X->get('xxx'); // go to declaration and mark occurences do not work ```
NReib
added a commit
to NReib/netbeans
that referenced
this issue
Mar 6, 2025
…name -Accessing a Constant of an Enum/Class now uses FQ name if possible Example: ```php namespace test; enum TestA{ case X; public function get(string $param): string{ return ''; } } namespace test2; enum TestB{ case X; public function get(): string{ return ''; } } \test\TestA::X->get('xxx'); // go to declaration and mark occurences do not work ```
NReib
added a commit
to NReib/netbeans
that referenced
this issue
Mar 6, 2025
…name -Accessing a Constant of an Enum/Class now uses FQ name if possible Example: ```php namespace test; enum TestA{ case X; public function get(string $param): string{ return ''; } } namespace test2; enum TestB{ case X; public function get(): string{ return ''; } } \test\TestA::X->get('xxx'); // go to declaration and mark occurences do not work ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Apache NetBeans version
Apache NetBeans 25 release candidate
What happened
The following 2 enums should demonstrate the Problem
...
\test\TestA::X->get('xxx');
Now 2 things are wrong: we cannot go to declaration of method "get" and Ctrl + P does not work there either (Show param list).
Apparently in VariousUtils.java extractVariableTypeFromVariableBase the unqualified Classname is determined. If we change it to qualified Name the behaviour will be as expected. For StaticMethodInvocation the Qualified name is already used, so I assume there would be no harm in doing the same here.
Language / Project Type / NetBeans Component
No response
How to reproduce
x
Did this work correctly in an earlier version?
No / Don't know
Operating System
Mageia
JDK
x
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
Yes
The text was updated successfully, but these errors were encountered: