安装
composer require --dev phpstan/phpstan
修改composer.json
"scripts": {
...
"stan": [
" php -d memory_limit=-1 vendor/bin/phpstan analyse app routes database config tests"
]
},
在项目根目录添加phpstan.neon配置文件
root@php-fpm:/var/www/laravel-demo# vi phpstan.neon
...