-
Notifications
You must be signed in to change notification settings - Fork 185
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
Won't propose classes and its methods #368
Comments
In what context are you testing this? Is it in a namespace? In global scope or in a function? |
pure empty file |
What do you mean with "pure empty file"? You will need at least a |
Talking of PHP classes. It will propose own classes.
|
Further looking it seem extension's code completion doesn't work at all. Code Tools works, but Code Completion doesn't. All i have is VSC's internal completion. Recent PHP 7.1.4 is setup correctly. php --ini in console brings no errors.
VSC output says all files parsed. Without any errors. Config
Tried reinstalling extension many time. No other php extensions. |
Dumb question, is the extension installed? If yes, which version? |
The one from marketplace. Tried uninstall/restart/install it many times. No luck. |
Which version? The newest? Could you try to generate some errors, for example putting an invalid memory limit inside the settings and check wether the language server boots up. Any errors in the developer console? |
1.2.1 Removing fbclient,dll from PHP folder brings errors.
Seem to work.
|
Nah, I meant to generate some errors the extension should throw when the php executable couldn't be found or is not valid... Also, the error logs from the developer tools are missing. Do you know how you get this? |
Even turned off all other extensions. Changing php.executablePath brings error At last same error from VSC if ruining config |
Seems that the language server is operating as usual as it should... Is there anything interesting in the output panel? Errors and Exception are logged there. Please send us the full log. |
|
Normal. Works fine. Did you modified your VSCode Installation(except for plug-ins)? |
No. Straight from installer. Updates itself time to time. Extensions are only from marketplace. |
hmm. Sorry, I don't know. I just can't reproduce... Last thing: Is it possible to get the files your editing? (Maybe in a git repository?) I could try and debug. |
Same with empty php files in empty folder as i noted at first. Do you have any tests to catch the problem? Aside of that i noticed that all hover tooltips have <?php in them. Seem to be parsing problem? Could be related? |
To be honest: I think there is no failure in the language server, but in your setup, since we got so many users where it is working fine. Nah, the Could you please give me access to your project folder and your full (workspace and user) settings? Maybe you disabled something you need to activate. |
I'm having what I think is the same issue as this one... A new empty folder, brand new PHP file, the only VSC extension enabled being this one (and I just now reinstalled it from the marketplace, just in case, and have never modified it), regardless of whether basic PHP auto complete is enabled or disabled (for that workplace), pretty much same results... with the contents
and hitting ctrl+space at the end there, I do get ZipArchive as a suggestion, but
I don't get any classes. I get no suggestion if basic suggestions are off, and I get zip functions (not the class) if they're on. Output:
(where test.php has the above contents) If I intentionally add a non-existent PHP in
but otherwise (be it not having this setting at all, or having it explicitly point to an installation of php-7.0.13-Win32-VC14-x64), in the console, I get
Visual Studio Code about:
VSC extension version: 1.2.2. |
@boenrobot Could you show us the your full settings, including user settings? Maybe something disables autocomplete... Does autocompletion in general work? |
My workplace settings.json:
my user settings:
everything else is default.
Starting off with an empty PHP file, and hitting ctrl+space, I do get |
With general, I mean other languages like TypeScript etc. But it looks like vscode is not the problem... At the moment, $_GET and other superglobals aren't suggested, this is something I want to add once we switched to the tolerant parser by Microsoft. (#357) Sorry, but I can't reproduce this 😢 |
Yes, it works for TypeScript and HTML certainly (double checked with files in the same folder as the PHP file). Could it maybe be an OS specific issue? I have Windows 10 Pro x64 (version 1703, build 15063.332, all windows updates installed). |
That's exactly the same setup as mine, except I do have a Home version. |
Forgot about it. Access to project folder is pointless as it's same on empty files in empty folder. But if you mean something like TeamViewer, then no problem. My user settings are
I keep worskspace (folder) empty, unless need to force specific encoding. But it's not of current case. I added args.push('-c ./php.ini'); to make sure it's loading own php.ini. This is clean php from php.net. May be missing some extensions? |
Hmm, let's see: Could you execute |
|
looks good to me. :/ |
+1. Same problem. |
Tried also setting US to system locale in case of there could be some parsing problems. But no. Does it need any additional extension? |
Aside of Windows, tried to install it on clean Ubuntu 17.04. Absolutely same behavior. |
That's not implemented, yet. (Called "signature support") Soon they will be a huge update, because we're switching the parsers. Maybe then it works? |
Hope so |
With new update suggestions works. Still no suggestion tootips though. And have few problems. Error expected semicolon on this
Few also problems could be related to original php extension? Should i post in VS Code issues?
|
I can also confirm that the original problem no longer occurs with version 1.4.0 of the VSC extension. I'm curious though... What changed? What was likely the key cause? |
The "expected semicolon" error will be fixed by #415. |
Closing this, please open new issues for the other problems |
From @regs01 on April 26, 2017 12:44
$zip = new ZipArchive; It won't propose ZipArchive. Won't propose new as well.
ZipArchive:: also won't propose methods.
Copied from original issue: felixfbecker/vscode-php-intellisense#114
The text was updated successfully, but these errors were encountered: