Sublime Forum

Intelephense error notification

#1

I get a notification
Undefined function ‘urls’ intelephense(P1010)
urls is correct, it’s a path specification of the used CMS.


It’s not very annoying, but if there’s a way to add functionality to intelephense, would it be nice to no longer see this note?

0 Likes

#2

This is from a VSCode github issue, but likely related:

1 Like

#3

I also found this, but unfortunately I can’t do the procedure described in the report. I can’t find where to do the setting, not in the LSP settings or in a config in the recources folder.
‘intelephense.environment.phpVersion’ I searched for those three words, intelephense, environment, php, … unfortunately without result. Maybe I need a Language Server Protocol (LSP) Premium license to get access to the settings.

0 Likes

#4

It looks like this is a supported setting of the language server: https://github.com/bmewburn/vscode-intelephense/blob/3979a35e76e4a6ad8da25cdcef073d621e9f06d5/package.json#L504-L509

So you would run Preferences: LSP-intelephense Settings from the command palette and then add something like

{
    "settings": {
        "intelephense.environment.phpVersion": "8.4.0"
    }
}

But this is already the default value. So I don’t think that it will resolve the issue.


I don’t know anything about PHP, but since you wrote that

urls is correct, it’s a path specification of the used CMS.

perhaps you need to configure the intelephense.environment.includePaths setting, so that the language server knows where certain functions come from.

1 Like