VSCode PhpStan READMEA vscode extension for phpstan and larastan. 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. FeaturesType checking while you write auto lint your php code, or use the command:
Requirements
If using Laravel: Install larastan
Create phpstan.neon on working directory and add the following
If not
or
Extension SettingsFor example: This extension contributes the following settings:
Known Issues
Improving performanceDebounce optionDepending 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 DISKFor 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) Release Notes1.0.0
1.0.1
1.0.2
1.0.3
1.0.4
AttributionsIcon by: icon-monk Original work: (https://github.com/breeze2/vscode-phpstan)[https://github.com/breeze2/vscode-phpstan] |