SanderRonde / phpstan-vscode

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

phpstan.paths is being applied to phpstan.binPath since v3.2.0 #104

Closed stefanfisk closed 2 months ago

stefanfisk commented 2 months ago

I have a script in dev/bin/phpstan that runs phpstan inside of a docker container. This together with phpstan.paths has worked great up until v3.2.0. Now the path mapping is being applied to binPath which results in the bin not being found.

When this happened there was no immediately clear error message. I first noticed the issue after I was confused about why the problems tab was empty even though I had a clear type mismatch in my code.

SanderRonde commented 2 months ago

Hmm I'm not too sure what the best course of action is here. I think it is the "right" way to go for it to be pathmapped. I'd assume that binPath points to the PHPStan binary itself in most workspaces, in which case path mapping should be enabled. A couple of ways to fix this for your case:

stefanfisk commented 2 months ago

I cleared all of my settings for the extension and then ran PHPStan: Launch setup and now it's all working again.