Skip to content
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

VS Code undefined function #920

Closed
AlexR04 opened this issue Dec 23, 2019 · 7 comments
Closed

VS Code undefined function #920

AlexR04 opened this issue Dec 23, 2019 · 7 comments
Milestone

Comments

@AlexR04
Copy link

AlexR04 commented Dec 23, 2019

Some php native functions displaying errors(red lines);
Error:
Undefined function 'sqlsrv_query' .intelephense(1010)
Undefined function 'sqlsrv_fetch_array'.intelephense(1010)
All files in my project with those php functions are displaying errors.

https://user-images.githubusercontent.com/24595935/71382564-8c7ca800-25a6-11ea-8499-5bf8547d52e9.png

OS - Windows 10 pro
Intelephense version 1.3.6

@bmewburn
Copy link
Owner

You can add sqlsrv to the intelephense.stubs setting to make these symbols available.

@AlexR04
Copy link
Author

AlexR04 commented Dec 23, 2019

Works. But now I got error with parameters
Expected 3 arguments. Found 2.intelephense(1005) [parameter 3 is optional in the php function]
https://user-images.githubusercontent.com/24595935/71417381-065a7300-2633-11ea-91c8-e80b20a1f194.png

Also with " ; " at the end of the line. (Javascript)
https://user-images.githubusercontent.com/24595935/71417356-e88d0e00-2632-11ea-9e75-4edc9ab46568.png

Sorry about that, but I payed the premium, and my project still red in to many files.

@KapitanOczywisty
Copy link
Contributor

KapitanOczywisty commented Dec 29, 2019

@AlexR04
First issue upstream: JetBrains/phpstorm-stubs#727
Second tracked in #836

@KapitanOczywisty
Copy link
Contributor

merged

@bmewburn bmewburn added this to the 1.3.8 milestone Jan 24, 2020
@xenogenesi
Copy link

Is there any way to disable this check for a line? (Decorators?)

I am using memprof (memprof_enable, memprof_dump_callgrind) functions which apparently are not available.

@KapitanOczywisty
Copy link
Contributor

@xenogenesi You can add file from this comment to your workspace arnaud-lb/php-memory-profiler#30 (comment)

@xenogenesi
Copy link

@KapitanOczywisty Thanks it works! How did I not think about it ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants