Community
Participate
Working Groups
Build Identifier: 2.2.0.v20100621 Have the following code in file1.php under 5.3 project: <?php namespace ns; class CCC{ } Have the following code file2.php under same project: <?php use ns\CCC as MyTest; $rt = new MyTe| // invoke code assist at cursor position | Actual: No completion available. Actual: MyTest should be suggested. Reproducible: Always
let's discuss how to fix this important issue
Hi QS have done something for this bug,if not,would you mind let me do it?
add MyTest to h2....PHPSourceElementRequestor,PhpIndexingVisitor
Created attachment 178298 [details] patch
For the following code, the CA works all right after patching. However the tool tip, go to source is not working for MyTest(); <?php namespace ns1\n; class CCC{ } namespace ns1; use n\CCC as MyTest; class MyT{ } $rt = new MyTest();
I think use n\CCC as MyTest; should be use ns1\n\CCC as MyTest; because it is said that: the leading backslash is unnecessary and not allowed, as import names must be fully qualified, and are not processed relative to the current namespace.
You can be correct. I'm not the expert of PHP namesapce. I tried some other cases by following your comments.Do you think the following case is valid? <?php namespace ns1\n\a; class CCC{ } namespace ns1; use ns1\n as m; $v = new m\a\CCC();
I think it is right,and go to source does not work for it.And I think it belongs to bug 323960,and I reopened it.
I think the CA has issue as well. $v = new m\| // CA here. I think the proposal should show the m\a\...?
hi QS I think you are right!
*** Bug 268312 has been marked as a duplicate of this bug. ***
fixed in head
The description code is not working as expected. Reopen ...
fixed
Verified. Closing...