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
You can add sqlsrv to the intelephense.stubs setting to make these symbols available.
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.
@AlexR04
First issue upstream: https://github.com/JetBrains/phpstorm-stubs/pull/727
Second tracked in #836
merged
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.
@xenogenesi You can add file from this comment to your workspace https://github.com/arnaud-lb/php-memory-profiler/issues/30#issuecomment-497820479
@KapitanOczywisty Thanks it works! How did I not think about it ...
Most helpful comment
You can add
sqlsrvto theintelephense.stubssetting to make these symbols available.