Psalm finds type errors, security issues, and fixable bugs in PHP codebases through static analysis, with optional automated fixes and taint-style security checks.
Overview
Psalm analyzes PHP projects without executing them, reporting type inconsistencies, unreachable branches, and other defects inferred from annotations and code structure. Strict settings aim to prevent most type-related runtime failures and encourage patterns seen in statically typed languages.
Security analysis tracks user-controlled input through the application to highlight risks such as SQL injection or cross-site scripting before deployment. Psalm also advertises automatic fixing of certain issues to streamline cleanup.
Users run Psalm via Composer installation, CI integration, or the public web demo that highlights issues inline. Documentation is published on the project site.
Active maintenance is led by community contributors following the original Vimeo engineering work, with optional paid support contracts advertised for deeper integration help.
Key features
- PHP type inference
- Taint and security analysis
- Automatic issue fixes
- Configurable strictness levels
- Composer-based CLI
- CI-friendly output
- Web playground demo
Use cases
- PHP codebase hardening
- CI type regression gates
- Security review automation