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

bug undefined symbol with function #787

Closed
virtazp opened this issue Dec 3, 2019 · 5 comments
Closed

bug undefined symbol with function #787

virtazp opened this issue Dec 3, 2019 · 5 comments

Comments

@virtazp
Copy link

virtazp commented Dec 3, 2019

** 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

@amaleky
Copy link

amaleky commented Dec 3, 2019

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

@KapitanOczywisty
Copy link
Contributor

KapitanOczywisty commented Dec 3, 2019

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

@virtazp
Copy link
Author

virtazp commented Dec 3, 2019

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

@bmewburn
Copy link
Owner

bmewburn commented Dec 3, 2019

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

@Andrew-devcoder
Copy link

Andrew-devcoder commented Aug 1, 2023

google first give me this page
bcz i want stay link : bmewburn/intelephense-docs#2 (comment)

p.s. add Intelephense setting core and wordpress

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

5 participants