This linter plugin for SublimeLinter provides an interface to PHPStan. The code analysis is executed on the edited file while you type, when it is saved and when its tab is clicked.
Analysing unsaved changes relies on the editor mode of PHPStan (1.12.27+ or 2.1.17+). With older versions, the file is only analysed once saved. To analyse on save only, set "lint_mode": "save" in your SublimeLinter settings.
SublimeLinter must be installed in order to use this plugin.
Please use Package Control to install the linter plugin.
Alternatively, you can clone this repository into your Sublime Text Packages directory as follow:
cd ~/Library/Application\ Support/Sublime\ Text/Packages
git clone https://github.com/Rockstar04/SublimeLinter-contrib-phpstanBy default, this plugin uses PHPStan from vendor/bin. Otherwise, it will fall back to a global phpstan executable (in that case, you must ensure that its path is available to SublimeLinter, see troubleshooting PATH configuration).
If you encounter a problem, you can enable debug mode to see what's going on by simply adding "debug": true to your SublimeLinter settings.
You can then view the debug messages in the Sublime Text console by going to View > Show Console.
⭐ Star it! ⭐
