-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Intelephense doesn't seem to work at all in my VSCode installation #1518
Comments
+1, have kind of the same issue. I'm not sure when the plugin updated but whenever I open a php file it instantly turns red: undefined * (everything). I get undefined type, method, etc. errors. I can't ctrl+click anymore, f12 does not work either. I tried with multiple projects and none of them are working porperly. Here is an example of a braintree_php example integration that was downloaded from github, this is the unedited, original repo. The issue is present since a few days now, any idea what causing it? |
I am using a premium license, and I see this too. I am also on a new 13" MBP with the M1 chip, so I assume that this issue may be my environment. Being that I am on silicon, then I am having to run the exploration version of Code, so that may be related too? I forgot to mention that I have $ /opt/homebrew/bin/php -v
PHP 7.4.12 (cli) (built: Nov 21 2020 22:14:06) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.12, Copyright (c), by Zend Technologies |
Are there any errors in the vscode output tab? |
No, nothing. No errors. P.S. Love Coffs Harbour. I'm just up the road in Mullumbimby... |
I have done some more testing with different versions of Code (stable, insiders, & exploration) on an M1 (Big Sur) & an Intel (Catalina) MBP:
I copied the I am not sure if any of the others are using the If I can test anything for you, please let me know. Thanks for the great plugin! |
Thanks for the testing @jimmypuckett . @markvirtue do you use short open tags? If so there's a setting for that
Mullumbimby is a nice part of the world. |
Thanks Ben! The shortOpenTag setting seemed to fix it. I changed that, and lots of things started to work. Maybe consider making that option default to TRUE...? But it's not working 100% yet... I have two Windows machines - one with all the code on it (the server), and a workstation on the same LAN, which accesses the source files across the network. If I open VSCode on the SERVER, and create a workspace that includes all the various folders involved the my application (C:/dir1, C:/dir2, etc), everything works 100% (and it's hugely useful - I love it!). But on my WORKSTATION (where I prefer to code), if I create a similar workspace with the same folders - referenced as //server/dir1, //server/dir2, etc - then some bits don't work. e.g. Pressing F12 on a function doesn't work (gives "No definition found"), and I get lots of squiggly-red-underlines under the names of "undefined" functions, even if the function is defined in a file that's part of the workspace and even OPEN in another tab. Can you think why that might be? Surely it must be something simple... I really appreciate this personal help, by the way. And as I said at the beginning of this thread, I'm happy to pay for your time to help me with these problems. My company can afford it! You're welcome to send me an invoice if you want. Mark. |
I'm not sure what happened but after some research, I decided to roll back to a previous version, then update the plugin. Now everything works fine (1.5.4->1.5.3->1.5.4). |
My last remaining issue (network paths vs local paths) seems to have been resolved by adding paths to the "include path" setting. |
Downgrade and upgrade indeed resolved my problem too. Thanks. |
FYI... I have downgraded all the way to 1.4.1 on my M1 mac with the exploration version & none of them worked. I have then upgraded back to 1.5.4 & still no go. |
I am in the same boat as @jimmypuckett running apple silicon m1, php built with home-brew. None of the code references seem to work. The issue seems unrelated to @markvirtue or @bodydisplaynone |
Not working on my M1 Mac under the Exploration version either. I receive no errors, but none of my classes/functions are getting resolved. The other PHP IntelliSense extension from Felix, seems to work. |
I'm going to close this as I think there's nothing to action regarding the original issue. For M1 Mac problems I've opened #1550 which will hopefully resolve this. |
I had the same error of class error underscores when the namespace had already been imported. The only solution was to install PHP Intelephense 1.7.1 |
What happens if you try to update it? See my comment above, I had the exact same problem and it was resolved by downgrading and then updating again. Currently running 1.8.2 latest and I have no issues. |
Well, none of above tips helped me for the same problem. But, silly me :-). Undefined classes, constants, etc... Intelephense works like charm once working folder is opened! This was my case. So when installed, and VSCode restarted, I simply opened my current working folder, and all inclusions (include, require, include_once, require_once, Use, etc.) are then read and voila. Hope this answer helps. |
When I downgraded it didn't work. But I tried again and this time I hit the "Reload is required" button. |
Apologies for the newby question. I'm prepared to pay someone to fix this issue for me, if required.
Or if I should post this question elsewhere, please let me know.
I have just installed the latest VS Code (on Windows 10), and then installed JUST the Intelephense plugin. I purchase a license for Intelephense and activated it.
I created a simple test workspace - one folder, one file. I defined a simple function in that file, and then wrote a call to that function (in the same file). When I click on the call to the function, and press F12, I get the message "No definition found for '[function name]'".
I disabled the builtin PHP plugin "PHP Language Features", as instructed, but it made no difference - except that certain tips no longer appear.
I have set "php.suggest.basic" to false.
I have correctly set the "php.validate.executablePath" setting to "C:/xampp/php/php.exe"
It feels like the entire plugin is not working. This plugin has a great reputation, so I feel like there's something simple I'm missing. Can anyone suggest anything?
Thanks in advance,
Mark.
The text was updated successfully, but these errors were encountered: