Closed Grldk closed 7 months ago
It looks like this means the config.ignoreErrors
setting contains non-string values. Could that be the case? That might help me find the fix.
Yeah that seems to be the problem. I had this:
"phpstan.ignoreErrors": [
/! [NOTE] No files found to analyse.
[WARNING] This will cause a non-zero exit code in PHPStan 2.0. /
],
Because I had some problems in the past where phpstan-vscode didn't handle files in the excludePaths
list in phpstan.neon.dist
correctly. If I remove that config the plugin works again. Seems that the line isnt necessary anymore anyway. Thanks!
Ahh I didn't know VSCode would interpret those as regular expressions instead of strings, will ensure this is fixed in the extension too so it won't happen in the future either. But good to know this fixes it, thanks!
@SanderRonde Hi! Many thanks for your work on the extension! After the latest update from 2.2.26 to 3.0.7, my setup broke. Now it crashes with:
[check:1] PHPStan process exited with error filteredErr=At least one path must be specified to analyse. rawErr=At least one path must be specified to analyse.
data=
As far as I understand, this is due to the absence of the "paths" in the phpstan.neon
, and the operating mode between the 2 and 3 versions differs: in the latter, it's always "project" mode.
Would it be possible to allow a "single file" mode in v3? The project I'm working on is quite old and contains millions of files. It works with the "paths", but I literally can't do things when it checks the entire folder on save :(
PS. Oh, it seems I'm late to the issue while writing the comment :D
Hmm I'll consider supporting it but it will depend on how much work it is to have the two versions coexist. I'll get back to you on that!
In the meantime you can right-click the extension and choose "install another version" to go back to the 2.0 version that still had file-checks.
Thank you! Yes, I rolled back to 2.2.26, and it works =)
Hey @HomelessCoder I've added support for it again. You can enable it using the phpstan.singleFileMode
setting. Or alternatively it'll warn you about that setting's existence if the "At least one path must be specified to analyze" errors is encountered. It should be live now in version 3.1.0
. Let me know if it works :)
@SanderRonde Omg! I didn't expect such an instant fix, but that just works! :heart_eyes: Thank you!
VS Code just updated the phpstan plugin to 3.0.7, this version crashes on startup with this error:
Not sure whats going on.. It crashes on every php file I open.