You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "qmegas (via GitHub)" <gi...@apache.org> on 2023/01/26 16:01:29 UTC
[GitHub] [netbeans] qmegas opened a new issue, #5371: PHP: Unable to find declaration of interface for instanceof operator
qmegas opened a new issue, #5371:
URL: https://github.com/apache/netbeans/issues/5371
### Apache NetBeans version
Apache NetBeans 16
### What happened
When using **instanceof** operator against the interface the Netbeans can't find the declaration of that interface (right click on interface name and choose Navigate -> Go To Declaration). However it works fine for classes.
I guess that IDE looking for the class only, however it should work fine with instances too. Reference to PHP documentation: https://www.php.net/manual/en/language.operators.type.php#example-124
### How to reproduce
Simple code to reproduce
```php
interface Foo
{
public function foo();
}
class Bar implements Foo
{
public function test()
{
echo 1;
}
}
$a = new Bar();
if ($a instanceof Bar) { //Do find declaration
$a->test();
}
if ($a instanceof Foo) { //Can't find declaration
$a->test();
}
```
If you Ctrl+Click on `Bar` in `$a instanceof Bar` line, the cursor will jump to `Bar` class declaration. However if you do the same for `Foo` interface, it won't work.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 10
### JDK
16.0.1
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
### Code of Conduct
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] tmysik closed issue #5371: PHP: Unable to find declaration of interface for instanceof operator
Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik closed issue #5371: PHP: Unable to find declaration of interface for instanceof operator
URL: https://github.com/apache/netbeans/issues/5371
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] junichi11 commented on issue #5371: PHP: Unable to find declaration of interface for instanceof operator
Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on issue #5371:
URL: https://github.com/apache/netbeans/issues/5371#issuecomment-1475435419
Reproducible. Thank you for your report!!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists