SanderRonde / phpstan-vscode

PHPStan plugin for VSCode
https://marketplace.visualstudio.com/items?itemName=SanderRonde.phpstan-vscode
MIT License
47 stars 8 forks source link

Broken with latest phpstan update (1.12.2) ? #100

Closed momala454 closed 2 months ago

momala454 commented 2 months ago

Hi since today, phpstan is not working. It's stuck with this (and no error is reported) : image

i don't know if it's related to a phpstan update, or vscode update, or if it's just me. I already tried restarting vscode

[9/6/2024, 8:27:24 AM] [client] Starting extension with configuration: {
    "phpstan.singleFileMode": false,
    "phpstan.binPath": "vendor/bin/phpstan",
    "phpstan.binCommand": [],
    "phpstan.configFile": "phpstan.neon,phpstan.neon.dist,phpstan.dist.neon",
    "phpstan.paths": {},
    "phpstan.dockerContainerName": "",
    "phpstan.rootDir": "",
    "phpstan.options": [],
    "phpstan.enableStatusBar": true,
    "phpstan.memoryLimit": "1G",
    "phpstan.enabled": true,
    "phpstan.projectTimeout": 300000,
    "phpstan.timeout": 300000,
    "phpstan.suppressTimeoutMessage": false,
    "phpstan.showProgress": false,
    "phpstan.enableLanguageServer": true,
    "phpstan.ignoreErrors": [],
    "phpstan.suppressWorkspaceMessage": false,
    "phpstan.pro": false,
    "phpstan.tmpDir": "",
    "phpstan.checkValidity": false
}
[9/6/2024, 8:27:24 AM] [client] Initializing done
[9/6/2024, 8:27:24 AM] [client] Showing one-time messages (if needed)
[9/6/2024, 8:27:24 AM] [server] Language server ready
[9/6/2024, 8:27:24 AM] [server] Language server started
[9/6/2024, 8:27:24 AM] [file-watcher] Checking: Manual project scan
[9/6/2024, 8:27:24 AM] [check:1] Check started for project
[9/6/2024, 8:27:24 AM] [status-bar] notification:' {"opId":0,"type":"new","tooltip":"Checking project"}
[9/6/2024, 8:27:24 AM] [status-bar] Showing status bar
[9/6/2024, 8:27:24 AM] [file-watcher] Checking: Manual project scan
[9/6/2024, 8:27:24 AM] [check:2] Check started for project
[9/6/2024, 8:27:24 AM] [status-bar] notification:' {"opId":1,"type":"new","tooltip":"Checking project"}
[9/6/2024, 8:27:26 AM] [server] PHPStan version: PHPStan - PHP Static Analysis Tool 1.12.x-dev@

[9/6/2024, 8:27:27 AM] [file-watcher] Checking: Manual project scan
[9/6/2024, 8:27:27 AM] [check:3] Check started for project
[9/6/2024, 8:27:27 AM] [status-bar] notification:' {"opId":2,"type":"new","tooltip":"Checking project"}
[9/6/2024, 8:27:27 AM] [file-watcher] Checking: Manual project scan
[9/6/2024, 8:27:27 AM] [check:4] Check started for project
[9/6/2024, 8:27:27 AM] [status-bar] notification:' {"opId":3,"type":"new","tooltip":"Checking project"}
[9/6/2024, 8:27:30 AM] [file-watcher] Checking: Initial check
[9/6/2024, 8:27:30 AM] [check:5] Check started for project
[9/6/2024, 8:27:30 AM] [status-bar] notification:' {"opId":4,"type":"new","tooltip":"Checking project"}
[9/6/2024, 8:28:15 AM] [file-watcher] Checking: Hover action
[9/6/2024, 8:28:15 AM] [fixer-manager] No file changes, not checking
[9/6/2024, 8:28:17 AM] [file-watcher] Checking: Document saved
[9/6/2024, 8:28:17 AM] [check:6] Check started for project
[9/6/2024, 8:28:17 AM] [status-bar] notification:' {"opId":5,"type":"new","tooltip":"Checking project"}
[9/6/2024, 8:28:20 AM] [file-watcher] Checking: Document saved
[9/6/2024, 8:28:20 AM] [check:7] Check started for project
[9/6/2024, 8:28:20 AM] [status-bar] notification:' {"opId":6,"type":"new","tooltip":"Checking project"}
[9/6/2024, 8:28:22 AM] [file-watcher] Checking: Hover action
[9/6/2024, 8:28:22 AM] [fixer-manager] No file changes, not checking
[9/6/2024, 8:28:23 AM] [file-watcher] Checking: Hover action
[9/6/2024, 8:28:23 AM] [fixer-manager] No file changes, not checking
[9/6/2024, 8:28:23 AM] [file-watcher] Checking: Hover action
[9/6/2024, 8:28:23 AM] [fixer-manager] No file changes, not checking
[9/6/2024, 8:28:24 AM] [file-watcher] Checking: Hover action
[9/6/2024, 8:28:24 AM] [fixer-manager] No file changes, not checking
[9/6/2024, 8:28:27 AM] [file-watcher] Checking: Document saved
[9/6/2024, 8:28:27 AM] [check:8] Check started for project
[9/6/2024, 8:28:27 AM] [status-bar] notification:' {"opId":7,"type":"new","tooltip":"Checking project"}
[9/6/2024, 8:31:17 AM] [file-watcher] Checking: Hover action
[9/6/2024, 8:31:17 AM] [fixer-manager] No file changes, not checking
[9/6/2024, 8:32:24 AM] [status-bar] notification:' {"opId":0,"result":"Killed","type":"done"}
[9/6/2024, 8:32:24 AM] [status-bar] notification:' {"opId":0,"result":"Killed","type":"done"}
[9/6/2024, 8:32:24 AM] [check:1] Check completed for project, errors= {"fileSpecificErrors":{},"notFileSpecificErrors":[]}
[9/6/2024, 8:32:24 AM] [check:1] PHPStan check timed out after 300000ms
[9/6/2024, 8:32:24 AM] [status-bar] notification:' {"opId":1,"result":"Killed","type":"done"}
[9/6/2024, 8:32:24 AM] [status-bar] notification:' {"opId":1,"result":"Killed","type":"done"}
[9/6/2024, 8:32:24 AM] [check:2] Check completed for project, errors= {"fileSpecificErrors":{},"notFileSpecificErrors":[]}
[9/6/2024, 8:32:24 AM] [check:2] PHPStan check timed out after 300000ms
[9/6/2024, 8:32:27 AM] [status-bar] notification:' {"opId":2,"result":"Killed","type":"done"}
[9/6/2024, 8:32:27 AM] [status-bar] notification:' {"opId":2,"result":"Killed","type":"done"}
[9/6/2024, 8:32:27 AM] [check:3] Check completed for project, errors= {"fileSpecificErrors":{},"notFileSpecificErrors":[]}
[9/6/2024, 8:32:27 AM] [check:3] PHPStan check timed out after 300000ms
[9/6/2024, 8:32:27 AM] [status-bar] notification:' {"opId":3,"result":"Killed","type":"done"}
[9/6/2024, 8:32:27 AM] [status-bar] notification:' {"opId":3,"result":"Killed","type":"done"}
[9/6/2024, 8:32:27 AM] [check:4] Check completed for project, errors= {"fileSpecificErrors":{},"notFileSpecificErrors":[]}
[9/6/2024, 8:32:27 AM] [check:4] PHPStan check timed out after 300000ms
[9/6/2024, 8:32:30 AM] [status-bar] notification:' {"opId":4,"result":"Killed","type":"done"}
[9/6/2024, 8:32:30 AM] [status-bar] notification:' {"opId":4,"result":"Killed","type":"done"}
[9/6/2024, 8:32:30 AM] [check:5] Check completed for project, errors= {"fileSpecificErrors":{},"notFileSpecificErrors":[]}
[9/6/2024, 8:32:30 AM] [check:5] PHPStan check timed out after 300000ms

manually starting vendor/bin/phpstan analyse works however

momala454 commented 2 months ago

Probably related to https://github.com/phpstan/phpstan/issues/11638 There wasn't a new release with the fix for the version number yet. Downgrading to phpstan 1.12.1 fixes it

[9/6/2024, 8:27:26 AM] [server] PHPStan version: PHPStan - PHP Static Analysis Tool 1.12.x-dev@
SanderRonde commented 2 months ago

Thanks for flagging! This is indeed related to that, and also to my code not falling back to any specific version once --version doesn't output something valid. Should be fixed in the next release (v3.2.1)