"Go to" with CodeIgniter
Hi,
I'm new to PHPStorm, I was using Nebeans. Is there a way with PHPStorm to ctrl+click a function and directly open the file and put the cursor where the function is defined? I miss it, and now it says "Cannot find declaration to go to".
Thx
请先登录再写评论。
It does exactly that.
But "Cannot find declaration to go to" indicates an issue in code resolve. That might be the case with CodeIgniter - this framework isn't officially supported yet. Feel free to vote for https://youtrack.jetbrains.com/issue/WI-1174
Below are a stack overflow post and a Github repo that I've found useful to provide solutions that don't require official IntelliJ IDEA (PHP plugin) or PhpStorm CodeIgniter framework support. Might not be ideal, but it is a huge improvement for me.
In my version of IDEA circa 2017, I didn't follow the more complicated "mark as plaintext" instructions and followed the less popular instructions in the stack overflow post that indicated: "Just drop the autocomplete.php file into the application/config folder and it works."
I used the CodeIgniter 3.0 for the repo as my base and added replaced the CI_Log and CI_Controller entries with my own My_Log and My_Controller entries for the $log and $controller variables. You may not have to do that but it solved a long-standing inability to autocomplete and navigate to the base classes with my IDE.
https://stackoverflow.com/questions/15424828/intellij-idea-12-not-finding-codeigniter-classes-throwing-errors
https://github.com/natanfelles/codeigniter-phpstorm