-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go to definition -> no definition found #225
Comments
Do you see any errors under "Help" > "Developer Tools" |
No, there is no error in the console and no error in the network tab. looks all fine. nothing is triggered in the logs on trying to jump to definition |
I have the same problem too, those options only work if i want a definition in the current file |
no sollution for it? i think vscode is going to be useless for me as php coder under windows now and i switch back to intelliJ or Atom |
Go to Definition is the first feature of this extension that I tried. Instead of getting an error, the "progressbar" just keeps moving across the screen as if it's constantly trying. Does Go to Definition work for anyone? Or is there something specifically wrong with our installations? |
I have the same problem.
Any way of forcing a scan or indexing of the workspace? (I'm on MacOS 10.13.3) [Edit] No errors listed in Developer Tools console. |
Same. Go to definition only works for definitions that exist in already-opened files. This makes closing and reopening a PHP project extremely painful. |
Hi, I remember that i coudn't fix this problem, but then i found a extension called Codeiginiter Intelliphense or something, and it has those options too. Of course, it only works if you have the framework. It could help somebody :) |
Does anyone here have try to reset the php.exe? Sometimes the php.exe isn't working and need to be killed. |
I have same problem, i need this feature like "Go to definition" of Sublime text 3 |
I definitely need to be able to go to definition as a PHP developer. |
As others have mentioned, 'Go to definition' only seems to work if you have already opened the file where the definition is located. Does anyone have a solution for this? |
I never experienced it. Hmmm...
Sent from My Asus Pegasus X005
Pada tanggal Sel, 22 Mei 2018 22.22, Tory Kepler <[email protected]>
menulis:
… As others have mentioned, 'Go to definition' only seems to work if you
have already opened the file where the definition is located. Does anyone
have a solution for this?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACr9NHJlvQg3c-kAExlRweycDatWKSPlks5t1C0lgaJpZM4Q5SxE>
.
|
Same issue here... |
Same issue here. Quite a pain in the ass |
Can anybody give more information? It works fine for me. Extension version? Operating system? PHP Version? How many source files? |
@danielhuang-030 When you tried the autocomplete does the autocomplete work? If not than don't expect that the goto function would work. I suggest to try https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client I don't advertise it, but for now that's a alternative that works very good and not depends on php.exe |
This comment has been minimized.
This comment has been minimized.
Any updates on this issue? I have the same problem! This is probably the most important feature everyone is looking for and there has to be a solution to solve the current problem. VS Code - version 1.27.1 ---- UPDATE ---- /**
* Show details for a given listing
*
* @param \App\Area $area
* @param \App\Listing $listing
*
* @return \Illuminate\Http\Response
*/
public function show(Area $area, Listing $listing)
{
if (! $listing->live()) {
abort(404);
}
if (auth()->check()) {
auth()->user()->viewedListing($listing);
}
return view('listings.show', compact('listing'));
} I was able to get the Go To Definition to work for the |
This comment has been minimized.
This comment has been minimized.
@benyaminl you already mentioned this before in the thread. Please keep this issue on topic. To everyone else: If there is no update posted on this issue, there is no update. I don't have the capacity to investigate this in my free time. If anyone wants to do a PR with a fix, I am willing to invest time to review it. Given the amount of people here that posted here that they are affected by this, one would think someone here would care enough to look into it. It's just PHP code 🙂 |
@felixfbecker I think it's time for you to set up patreon profile so it would be your side project that generate money ✌️ so you have more time for develop it because it generate money :v |
This comment has been minimized.
This comment has been minimized.
On MacOS, when a folder is a symlink to another folder the content is not indexed, thus some definitions are not working. Could this be the problem ? |
The problem is that by default this extension doesn't scan all files. You have to do hax like patching the source, or making sure the first directory in your workspace is an aggregate of any other directories in your workspace (defeating the purpose of having them broken down cleanly in the first place). The solution is to make the scan directories configurable, but I haven't written a patch for it yet. |
@cha0s This was it for me, and I'm curious how many others in this thread are in similar situations. I had two folders: a project folder (mostly text files and assets) and a library folder (PHP). "Go to Definition" only worked when the file containing the definition was already opened. I then removed the project folder, so I only had the PHP folder, and now can navigate to those definitions even when the file is closed. And for anyone wondering - I added the project folder back so that it was second on the list, and Intellisense still worked happily after a fresh restart. So it appears from behavior like the defect here is that the plugin only looks at the first directory in the list. |
Works for me as well if the first folder in the project is the one including all the other code. Thanks for the tip. |
Nope. Just endless scanning in my case... Find all references does not work too. |
Same for me - the go to definition doesn't work in case of Joomla larg projects. |
Same for me. Go to definition doesn't seem to be working specially when calling functions. I am using PHP in Visual Studio Code. OS is ubuntu. Auto complete is working fine. I installed PHP intelephense 0.8.8 extension. But still not working. Any updates on this issue? |
Hello please it's Intelisense project repository. Intelephense Project repository is on https://github.com/bmewburn/intelephense/issues |
Hello @benyaminl Tried with Intellisense extension also. But not functioning the go to definition for function calls. Just showed as loading without directing to the definition location. |
If it's joomla seems there's some problem that you should know. Joomla code sometimes not follow the PSR standard and it's sequential in some way, that need special plugin for it. I also experience it with Laravel where the routing and other object not working and their code some follow the rule some not, Also Dolibarr ERP(based on PHP). You can't ask the universal tools to support code that's aren't standard. Sorry. |
@benyaminl thank You for that information. :) |
Not everything working in PHP Strom, Dolibarr isn't supported on both of editor, and only class, variable and such that's follow the PSR standard that's indexed. So for me it's normal for VS Code. PHP Strom is too heavy and not power friendly |
I don't talk about intelephense bug, but many people refer it too much. I think I just refer them to it and stop talking OOT, sorry if it's seems so pushy, but it's intelisense project and not for other extension mater. That's why I remind them. |
Hi, I use vscode with a codeigniter php project, and I'm making a simple model-controller stuff using CI as base, but the $this->post_model->get_posts(); isn't picking up the get_posts from the method. I also work on a huge project at work, where this would be essential, and it's quite frustrating, because I used to use phpstorm and it worked like charm. |
I see that in https://intelephense.com/ they are selling that option. |
For me the issue was that vs code was using php v7.0.3 (for me it is "php.validate.executablePath": "C:/wamp64/bin/php/php7.4.0/php.exe",) |
I have similar problem. And with separate functions with the same name. Eg: myCustomFunction() in adminInclude.php file and myCustomFunction() in indexInclude.php. adminInclude.php file is included in admin.php and there I use myCustomFunction(). indexInclude.php is included in index.php and there I use myCustomFunction() too. Go To Definition shold find definions in both files, but there is only one sometimes from adminInclude.php someitmes from indexInclude.php. |
I think I found a solution. I installed the extension: https://marketplace.visualstudio.com/items?itemName=DEVSENSE.phptools-vscode Go To Definition works fine. |
i installed php-intellisense in the morning, disabled
php.suggest.basic
, setphp.executablePath
and opened my php project folder (inserted into workspace).if i want to go to a definition of a class or function or var i allways get a message that no definition is available.
http://prntscr.com/hk8x14
the project was written in intelliJ and all works fine there. a change to vscode without correct working php intellisense is senseless.
The text was updated successfully, but these errors were encountered: