debug-phpstan
Installation
SKILL.md
Debug PHPStan
Workflow
- Read the exact PHPStan message and line.
- Identify whether the issue is a real bug, missing type, generic mismatch, or framework inference gap.
- Prefer code-level types, typed collections, return types, and PHPDoc generics over broad ignores.
- Use targeted ignores only when framework magic cannot be expressed safely.
- Re-run PHPStan after each small fix.
Verification
vendor/bin/phpstan analysepasses.
Common Mistakes
- Adding
mixedeverywhere. - Ignoring real nullable access bugs.