Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignores php.executablePath VSCode configuration #17

Closed
huchim opened this issue Aug 7, 2020 · 2 comments · Fixed by #46
Closed

Ignores php.executablePath VSCode configuration #17

huchim opened this issue Aug 7, 2020 · 2 comments · Fixed by #46
Assignees
Labels
bug Something isn't working

Comments

@huchim
Copy link

huchim commented Aug 7, 2020

Hello!

I'm receiving this message from extension v1.2.2:

PHP executable not found. Install PHP 7 and add it to your PATH or set the php.executablePath setting

I created a new entry in my settings.json file with php.executablePath but VSCode say "unknown configuration Setting".

Add PHP directory to $PATH works fine but not using VsCode configuration.

{
    "php.executablePath": "C:\\home\\etc\\php\\php.exe",
    "php.validate.executablePath": "C:\\home\\etc\\php\\php.exe",
    "php.validate.enable": false
}
Version: 1.47.3 (user setup)
Commit: 91899dcef7b8110878ea59626991a18c8a6a1b3e
Date: 2020-07-23T13:12:49.994Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18363
$ php -v
PHP 7.2.31 (cli) (built: May 12 2020 10:49:38) ( NTS MSVC15 (Visual C++ 2017) x86 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Thanks!

@pristinesource
Copy link
Collaborator

@huchim You will want to use the following config options for Psalm:

{
    "psalm.phpExecutablePath": "C:\\home\\etc\\php\\php.exe",
    "psalm.phpExecutableArgs": [
        "-dxdebug.remote_autostart=0",
        "-dxdebug.remote_enable=0",
        "-dxdebug_profiler_enable=0"
    ],
    "psalm.connectToServerWithTcp": true
}

The other settings you have there are for the built in PHP syntax and validation in VSCode. You will still need to have the values as you have set there, although it may be beneficial to have php.validate.enable set to true unless you are using a different PHP validator such as "PHP IntelliSense" (https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-intellisense) or "PHP Intelephense" (https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client).

@pristinesource
Copy link
Collaborator

pristinesource commented Aug 7, 2020

@huchim Indeed the error message you got is incorrect because it says the wrong config key, and I will mark this as a bug so it can be fixed during the next release. Thank you for letting us know! 😉

@pristinesource pristinesource added the bug Something isn't working label Aug 7, 2020
@pristinesource pristinesource self-assigned this Aug 7, 2020
@tm1000 tm1000 assigned tm1000 and unassigned pristinesource Jun 28, 2021
tm1000 added a commit that referenced this issue Jun 29, 2021
- Fixes #16
- Fixes #17
- Adds restart workaround for server crashing on shutdown
- Fixes STDOUT logging by modifing StreamWriter directly
- Removes archived MZ in favor of system spawn and promisify-child-process instead
@tm1000 tm1000 mentioned this issue Jun 29, 2021
@tm1000 tm1000 closed this as completed in #46 Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants