VSCode PhpStan README
A modified version of the great work of breeze2
I made made my own version this extension because I need a plug and play extension that works with live type checking and only required conf is to have installed phpstan and larastan to work with Laravel projects.
Type checking while you write auto lint your php code, or use the command:
If using Laravel: Install larastan
Create phpstan.neon on working directory and add the following
This extension contributes the following settings:
Depending on the speed of your computer and the size of your project you could reduce debounce to 1000 or 500ms so you will have faster type checking.
Create a RAM DISK
For live type checking as this extension does not use a server we need to save to temporary files in order to allow phpstan to analyze current working file, so its reading and writing file every few seconds, in order to improve a little:
You can create a ram disk to enhance disk writing files speed Example for MacOs
This will create a Volume on Volumes\RAMDisk
Then change on the
You could also modify the phpstan.neon file to include inside parameters, this will make all cache generated by phpstan to be on the very fast RAMDisk:
This disk is not persistent so you should create the RAMDisk on every restart (google tells you how to automatize this)