coc-phpls: Undefined functions, types, etc.

Describe the bug It seems that the plugin is not able to find the definitions. I get all kind of undefined … errors. However the Intelephense plugin for VS Code works just fine. See screenshots.

To Reproduce Steps to reproduce the behavior:

  1. Install Neovim and use my config and my coc-settings
  2. Install a regular Laravel Project and install and run barryvdh/laravel-ide-helper
  3. (optional) Install some other Packages (GraphQL or whatever you want)
  4. Use some stuff from the vendor folder, or even use some laravel functions like abort or app
  5. See the undefined messages

Expected behavior I’d expect the functions and classes to be found ^^

Screenshots Bildschirmfoto 2020-02-16 um 15 51 59 Bildschirmfoto 2020-02-16 um 15 52 41

Desktop

  • OS: macOS 10.15.3 / Linux Manjaro 18
  • NVIM v0.4.2 Bildschirmfoto 2020-02-16 um 16 10 34

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (2 by maintainers)

Most upvoted comments

Hi, please try call “CocCommand intelephense.index.workspace” command

Workspaces are a mystery to me, I think it’s supposed to be the top-level dir under which everything is indexed, right? But I have no idea how to set it for a given file. But this command fixed it for me, I’m just not sure what it did/does!

It would be great if the README of this project gave some more documentation to; even if that’s just links to other projects. It’s not clear when there’s a problem if it’s this, Coc, Intelephense, …!

Yeah, it would be nice if someone could fix this. For now I disabled all the broken stuff.

"intelephense.diagnostics": {
    "undefinedTypes": false,
    "undefinedFunctions": false,
    "undefinedConstants": true,
    "undefinedClassConstants": true,
    "undefinedMethods": false,
    "undefinedProperties": false,
    "undefinedVariables": false
},