Komodo 10 IDE Last Night Build and PHP + Yii2 autocompletion

  1. Komodo 10 IDE Last Night Build
  2. I opened my PHP5.6 + Yii2 framework project folder.
  3. Created Komodo project file and add path to the php interpreter and the root of Yii2 application folder in project properties
  4. I’m waited for indexing my project files
    As a result, I have not quite correct operation of PHP code autocompletion in this case:

    Komodo IDE 10 can’t autocomplete $newsImage methods and property in this example (it is part of more complex controller code with Yii2 Active Record ).
    Are there any recommendations for this situation?

Hi, that /** @var NewsImage $newsImage */ should not be necessary. First remove that. Then hover over NewsImage from new NewsImage while holding down the Ctrl modifier key. NewsImage should underline and show some information on where it is located (“go to definition” behavior). If this is not the case, then NewsImage could not be resolved and Komodo’s code intelligence either could not find that class or there was an error (Help > Troubleshooting > View Log File would indicate this).

Hi! Thanks for answer! I tried to test the autocompletion without PHPDocs - there is no difference…

And what about Ctrl+Hover over NewsImage?

I can go to definition and open NewsImage model on Сtrl + click and can get gray popup with Ctrl + hover on NewsImage class(you can see result in attached image in the previous post)…
It is part of log:
INFO: _hit_from_elem_imports:: ie: lookup (‘newsImage’,) in <php-5.6 stdlib> => []
INFO: _hit_from_elem_imports:: ie: no matches found
ERROR: evaluating ‘newsImage’ at newseditcontroller.php#244: could not resolve first part of ‘newsImage’
[2016-06-01 17:43:50,451] [WARNING] console-logger: Key event not available on some keyboard layouts: key=“m” modifiers=“control,alt” (1) in chrome://komodo/content/tail/tail.xul:0
[2016-06-01 17:43:50,453] [WARNING] console-logger: Key event not available on GTK2: key=“u” modifiers=“control,shift” (1) in chrome://komodo/content/tail/tail.xul:0
[2016-06-01 17:43:50,453] [WARNING] console-logger: Key event not available on some keyboard layouts: key=“v” modifiers=“control,alt” (1) in chrome://komodo/content/tail/tail.xul:0

Oh sorry, I had my image blocker running at the time :frowning:

When you Ctrl+Click the NewsImage class and go to it, does the code browser in the right panel show methods and variables and such?

Yes - I can see methods and variables (you can check in attached image)

Thanks for all of the info. This appears to be a bug. Would you please file a ticket on our bug tracker with the code the reproduces this issue? (A minimal example would work if you don’t want to post the contents of your files.) https://github.com/Komodo/KomodoEdit/issues


Hmm… I need to think how to create working example with this issue - in this case it is part of complex Yii2 framework project with lot of models relations and ect… I try to generate new Yii2 advanced project with less complex code and check this issue…

That is very much appreciated. In the mean time, could you post the entire contents of your error log (instead of the snippet above). That may help identify the problem too.

It is 3Kb log file! maybe I can to share it via Dropbox service?

How about a gist?

log from Komodo IDE 10 last night build

Updated to last Komodo X Night build 89206. Komodo can’t find $news variable in this case and i can’t use autocomplete feature for $news instance. One more bug I think…

Yes, we do not appear to be able to extract a variable assignment within a control structure like “if”.

Also, thanks for posting your log file. Sadly I wasn’t able to clean anything obvious from it. I’d need the code to be able to debug this one. As I mentioned before, if you ever have the chance to put together something small that reproduces the issue, please let us know on our bug tracker and I’ll take a look.

Do we have a bug open for this?

I try to find free time at this weekend for this issue

I thought we did, but I couldn’t find it. I’ve logged a new one: https://github.com/Komodo/KomodoEdit/issues/1682