phpstan-vscode icon indicating copy to clipboard operation
phpstan-vscode copied to clipboard

No Errors in vscode + wsl2 setup

Open gyaaniguy opened this issue 1 year ago • 1 comments

Running vscode with wsl2 . Have a folder in wsl environment. Installed phpstan for vscode. vscode terminal output

[file-watcher] Document changed, checking
[check:3] Check started for file:///home/aa/work/lamp_code/test/test.php
[status-bar] Showing status bar
[file-watcher] Document changed, checking
[file-manager] Not checking file "file:///home/aa/work/lamp_code/test/test.php", file check is pending (checkId=3)
[file-watcher] Document saved, checking
[file-manager] Not checking file "file:///home/aa/work/lamp_code/test/test.php", file check is pending (checkId=3)
[file-watcher] Document active, checking
[file-manager] Not checking file "file:///home/aa/work/lamp_code/test/test.php", file check is pending (checkId=3)
[status-bar] Hiding status bar, last operation result = Error
[check:3] Check completed for file:///home/aa/work/lamp_code/test/test.php errors= {}

Running on the command line generates errors

❯ phpstan analyze test.php
 ------ ------------------------------------------------------------
  Line   test.php
 ------ ------------------------------------------------------------
  4      Syntax error, unexpected T_STRING, expecting ';' on line 4
  13     Syntax error, unexpected T_STRING on line 13
 ------ ------------------------------------------------------------
 [ERROR] Found 2 errors

Running the script itself

❯ php test.php
PHP Parse error:  syntax error, unexpected identifier "xxss", expecting "," or ";" in /home/aa/work/lamp_code/test/test.php on line 4

Ideas please ? I have no xdebug error messages.

gyaaniguy avatar Mar 10 '24 13:03 gyaaniguy

Hey sorry for the late response. Could you try using the pre-release version of the extension? If the issue does still occur there it's a lot easier for me to help you debug.

SanderRonde avatar Mar 17 '24 14:03 SanderRonde

Issues go stale after too much time without activity. If inactive for another 7 days this issue will be closed.

github-actions[bot] avatar May 17 '24 02:05 github-actions[bot]