refactor: update phpstan.neon with Larastan 3.x best practices

- Add databaseMigrationsPath for model property type inference
- Add configDirectories for config key validation
- Add parseModelCastsMethod to read casts() methods
- Add enableMigrationCache for faster repeated analysis
- Ignore intentional 'new static()' pattern (Autolink has subclass)
- Remove stale baseline reference and outdated comments
pull/6839/head
Your Name 4 weeks ago
parent fc3dd0db4e
commit 890dc55342

@ -3,10 +3,27 @@ includes:
- vendor/nesbot/carbon/extension.neon
parameters:
# Level 10 is the highest level
level: 0
# Laravel specific configurations
paths:
- app/
- routes/
- tests/
excludePaths:
- bootstrap/cache/*
- storage/
- vendor/
# Laravel-specific analysis
databaseMigrationsPath:
- database/migrations
configDirectories:
- config
translationDirectories:
- resources/lang
# Feature checks
noModelMake: true
noUnnecessaryCollectionCall: true
checkModelProperties: true
@ -15,19 +32,12 @@ parameters:
checkModelAppends: true
checkModelMethodVisibility: true
checkAuthCallsWhenInRequestScope: true
parseModelCastsMethod: true
enableMigrationCache: true
checkMissingTranslations: false
translationDirectories:
- resources/lang
paths:
- app/
- routes/
- tests/
excludePaths:
- bootstrap/cache/*
- storage/
- vendor/
# Ignore intentional patterns
ignoreErrors:
- '#Unsafe usage of new static#'
reportUnmatchedIgnoredErrors: false

Loading…
Cancel
Save