bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.63k stars 94 forks source link

does not recognize all the basic functions. #3107

Open zadepark opened 1 week ago

zadepark commented 1 week ago

Describe the bug does not recognize all the basic functions.

To Reproduce class areyoupayingattention {

function __construct()
{
    add_action("enqueue_block_editor_assets", [$this, "adminassets"]);

}

Expected behavior Recognize the function and explain

Screenshots

Screenshot 2024-10-29 at 3 02 57 AM

Platform and version OS and Intelephense version.

bmewburn commented 1 week ago

How are you providing the wordpress symbol definitions? Is wordpress src in your open folder? Or have you added wordpress to intelephense.stubs? Or are you providing the symbols some other way?

ChrisTaylorDeveloper commented 4 days ago

I am having a similar issue. I am using neovim. I have configured intelephense in lua like this

        intelephense = {
          stubs = { 'wordpress' },
        },

all the WordPress functions are 'Undefined function ...'. How can I configure the Intelephense WordPress stubs properly?