[php] typing parent:: does not provide methods of the parent's trait
See original GitHub issueApache NetBeans version
Latest release
What happened
Netbeans does not show the methods of a trait used by a parent class in the auto completion context.
How to reproduce
Create a PHP file and insert following code:
<?php
trait T {
protected function foo() {}
}
class A {
use T;
protected function shownFnc() {}
}
class B extends A {
protected function foo() {
parent:: // <-- place your cursor here
}
}
Now place your cursor at the hinted line and hit ctrl + space
keys. Now, the auto complete menu shows the shownFnc
method, but not foo
.
Did this work correctly in an earlier version?
- This used to work!
Operating System
Debian 10.11, Linux version 4.19.0-14-amd64
JDK
11.0.12; OpenJDK 64-Bit Server VM 11.0.12+7
Apache NetBeans packaging
Other
Anything else
Netbeans is installed via flatpak
Are you willing to submit a pull request?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow the Apache Software Foundation’s Code of Conduct
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Object Inheritance - Manual - PHP
Private methods of a parent class are not accessible to a child class. As a result, child classes may reimplement a private method...
Read more >PHP trait: is there a proper way to ensure that class using a ...
So my question is: Is there a way to ensure (at compile time, not at runtime) that class which uses a certain trait...
Read more >php - Should a trait refer to parent methods?
It's fine if a trait depends on methods in the class into which it is embedded. But these dependencies should be explicit, by...
Read more >tighten/parental: Use single table inheritance in your Laravel ...
Parental is a Laravel package that brings STI (Single Table Inheritance) ... By adding the HasChildren trait and a type column to the...
Read more >Twin Studies: A Unique Epidemiological Tool - PMC - NCBI
Twin studies are a special type of epidemiological studies designed to measure the contribution of genetics as opposed to the environment, to a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Will look at it later. Thanks.
@junichi11 Great! Thank you very much 😃