Closed rubinlinux closed 7 months ago
Thanks for the clear report :). This is a bit of a known isshe that I'm pretty sure this is fixed in the pre-release version of the extension though. Can you check that out and see if that fixes it? If so I should probably release it soon.
The pre-release version works a bit differently, it runs phpstan on the whole project instead of on individual files. Should ensure it uses caching (making it faster) as well as fixing issues like this.
Hi SanderRonde,
The pre-release does solve it for me. Thank you so much!
If your phpstan.neon file contains an excludePaths: but you edit a file in one of those paths with vscode, you will receive an error every time you save, as phpstan is being handed the file to analyse but it has been told not to analyse that file.
For me this is the case because I do not have phpstan configured to evaluate our tests/ directory and a couple of other files which for one reason or other are not useful to have errors about.
In the PHPStan Client logs, after saving a file in tests/ I get this:
using phpstan 1.9.14, extension v2.2.26
It may be useful to have a config setting of excludes for this plugin; or have it read the excludes from the existing .neon file.