-
Notifications
You must be signed in to change notification settings - Fork 0
Larastan
Clio Brichaut edited this page Jan 14, 2023
·
1 revision
"Larastan focuses on finding errors in your code. It catches whole classes of bugs even before you write tests for the code." [source]
-
Install the package with
./vendor/bin/sail composer require nunomaduro/larastan --dev(in wsl terminal) orcomposer require nunomaduro/larastan --dev(in the php container). -
Create the
/app/app/phpstan.neonfile containing the paths to include in the analysis, and the analysis' strictness (level=0-9):
includes:
- ./vendor/nunomaduro/larastan/extension.neon
parameters:
paths:
- app/
- database/factories
- database/seeders
- routes
- tests
level: 9
Execute the analysis with ./vendor/bin/phpstan analyze (in the php container).
The output should look like this:
