NoteThis is a fork of OhMyMndy/vscode-phpstan created in order to avoid forcing the analysis level if there is a This is just a hack, there's a lot of other stuff not up-to-date here (e.g. dependencies), the lock file is not in sync with the main Furthermore, diagnostics are cleared when a file is closed, with the goal of only displaying diagnostics for currently opened files. NoteBecause calvinbaart/vscode-phpstan seems not supported anymore, I have continued development through this fork What is thisPHPStan is a static analysis tool for PHP. This extension integrates the output of PHPStan in VSCode allowing the developer to find errors quicker. InstallationPHPStan is required to use this extension. By default the plugin will search the global vendor folder and the workspace vendor folders.
The COMPOSER_HOME environment variable can be set to change where the plugin searches.
This path can be manually set using the PHPStan can be installed globally using:
or locally using:
CommandsPHPStan includes an explorer-context command called "PHPStan: Scan for Errors". This command works on both directories and files.
Configurationvscode-phpstan-extension provides the following configuration properties and defaults:
|