For heavy wp users that don't keep core files in the workspace. They can then have a common workspace/user config that gives wp intelligence without manually installing stubs or including core in each project.
Available in 1.3.3. Needs to be activated by adding wordpress to the intelephense.stubs array in settings.
Sorry to add to a closed issue. I appreacite the fix you've done for this, it's fixed the problem arising for WordPress functions but I'm still getting errors appear for generic PHP functions, such as:
Undefined function 'trim'.intelephense(1010) and Undefined function preg_match'.intelephense(1010)
Is there something obvious I'm missing here?
@TidyLuke looks like you've removed other things from intelephense.stubs. Try removing this setting and adding wordpress from UI (ctrl+comma). There should be like 80 items in this list.
@KapitanOczywisty you're right! Thank you, adding this fix to settings.json led me to overwrite everything esle, doh! Thanks again :)
Where are the WordPress stubs pulled from? Where would I go to report an issue against the WordPress stubs?
@HowdyMcGee https://github.com/php-stubs/wordpress-stubs
It is possible to add support also for https://github.com/php-stubs/woocommerce-stubs ?
@Mte90 Is it maintained?
This project or intelephense? AS i can see they are both mantained.
All right.
Most helpful comment
Available in 1.3.3. Needs to be activated by adding
wordpressto theintelephense.stubsarray in settings.