Vscode-intelephense: bug undefined symbol with function

Created on 3 Dec 2019  路  4Comments  路  Source: bmewburn/vscode-intelephense

* Describe the bug *
The plugin considers the functions as an error: Undefined symbol 'get_header' (Wordpress)

Reproduce

get_footer is considered the error

Screenshot
image
image

thank you

Most helpful comment

1.3 now identifies functions that can't be found in the workspace. If you don't want to have wp core in your project then there are also stubs that can be added eg https://github.com/GiacoCorsiglia/wordpress-stubs . Alternatively, undefined symbol checks can be turned off "intelephense.diagnostics.undefinedSymbols":false

All 4 comments

Also for laravel "Aliases" and built-in methods.

These functions are defined in wp-includes/general-template.php, include it in workspace or disable intelephense.diagnostics.undefinedSymbols setting.

You may want to include all wp-includes/*-template.php

That's right.
It's weird, before I did not have those mistakes
Thank you

1.3 now identifies functions that can't be found in the workspace. If you don't want to have wp core in your project then there are also stubs that can be added eg https://github.com/GiacoCorsiglia/wordpress-stubs . Alternatively, undefined symbol checks can be turned off "intelephense.diagnostics.undefinedSymbols":false

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aleksandervines picture aleksandervines  路  3Comments

mushmelty picture mushmelty  路  4Comments

ottopic picture ottopic  路  3Comments

steven7mwesigwa picture steven7mwesigwa  路  4Comments

dgunay picture dgunay  路  3Comments