This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I would like to see better nested object code completion for PHP. What I mean by "nested" objects is where an object has a property that is an object. Take the following example: $obj1 = new stdClass(); $obj1->obj2 = new stdClass(); $obj1->obj2->str1 = 'Test'; // no code completion (expected: $obj1-> should suggest "obj2") echo $obj1->obj2->str1; // no code completion (expected: $obj1->obj2-> should suggest "str1") Lastly, I've also noticed that code like the following works fine with the autocompletion: // FILE: File.php class Class1 { var $subClass; function Class1() { $this->subClass = new Class2(); } } class Class2 extends Class1 { var $str = 'test'; } $obj = new Class1(); echo $obj->subClass->str; // autocompletes fine BUT, the above will have autocomplete issues when the two class definitions are moved to a separate file, as follows: // FILE: File1.php class Class1 { var $subClass; function Class1() { $this->subClass = new Class2(); } } class Class2 extends Class1 { var $str = 'test'; } // FILE: File2.php $obj = new Class1(); echo $obj->subClass->str; // autocompletes for $obj->, but $obj->subClass-> has no suggestions Thanks!
reassigning to default owner
I also noticed this bug in 6.9 on mac os x pretty much the same as described in the first description. Also I thought I should note that even trying to define the property in a comment does not work ie if I have and object that looks like this: $obj->subclass->prop and I try to define subclass in the comments like this /* @var $obj->subclass SubClass */ this does not work either. I realize that may not have been the intention of the comment definition but I though I would give it a try and see but it doesn't work.
Broken for me as well on Mac 10.6.4 with NB 6.8 or 6.9 in PHP. Also of note, when implementing interfaces, constants from the interface do not autocomplete in the implementing class. Ex: interface Test { const testConst = 'test'; } class TestClass implements Test { ... } $test = new Test(); $constString = $test::testConst; <-- this will not autocomplete I use this many times a day. Saves hunting down frustrating typos ;o)
batch reassigning
This feature was working ok for me until last update, since then (about a week ago) this stop working. I'm using netbeans 7.1 updated, under ubuntu linux. Is there a chance of uninstall the updates? that could help me.
Reproductible in 8.2rc / Dev 201609210002
The interface showcase from Comment 3 is resolved in NB 8.2 for me. The separated class showcase works for me on NB 8.2 (as long as you don't mess with the namespaces). ---------- But the stdClass example of Comment 1 is still broken: $obj1 = new stdClass(); $obj1->obj2 = new stdClass(); $obj1->obj2->str1 = 'Test'; // no code completion (expected: $obj1-> should suggest "obj2") echo $obj1->obj2->str1; // no code completion (expected: $obj1->obj2-> should suggest "str1") I don't know if that enhancement will actually be added someday.