How to set php executable path php.validate.executablePath in vscode when php is set inside docker container?

后端 未结 13 1358
既然无缘
既然无缘 2021-01-30 08:47

I have a development environment based in docker.

Everytime that I open VSCode I get this message:

Cannot validate since no PHP executable is set.

13条回答
  •  遇见更好的自我
    2021-01-30 09:43

    I don't know if this helps but I ran into the same problem with the extension PHP Intelephense in Visual Studio Code. What I did is read the instructions so the extension could work properly. So I disabled PHP Language Features by searching "@builtin PHP" in the extensions. Also, other (3rd party) PHP extensions that provide similar functionality should also be disabled for best results. Finally, I added glob patterns for non-standard PHP file extensions to the files.associations setting. For example: "files.associations": { "*.module": "PHP" }

    Doing this made the error go away. I'm new to PHP too, let me know if this is the correct way of solving this problem with PHP Intelephense.

提交回复
热议问题