# Psalm

> Free and open source static analysis tool for finding errors in PHP code

Source: https://talira.ai/catalog/psalm-fwm4fe8q
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [developer tools / type checking](https://talira.ai/categories/developer-tools/type-checking), [developer tools / code quality](https://talira.ai/categories/developer-tools/code-quality), [languages / php](https://talira.ai/categories/languages/php)
- Licence: MIT[^3]
- Pricing: Free and open source[^1][^2]
- Pricing notes: Free and open source; paid support contracts (integration, issue support and feature development) from the maintainer, Daniil Gentili.
- Free tier: yes[^1][^2]
- Plugins: yes[^4]
- Backed by: [Vimeo](https://talira.ai/orgs/vimeo.md)

Psalm is a free, open source static analysis tool for PHP that finds type errors and other bugs before the code runs. On its strictest level it can prevent almost all type-related runtime errors, using types from declarations and docblocks (generics, array shapes and more); its taint analysis follows user input through the code to find SQL injection, XSS and other vulnerabilities, and it can fix many issues automatically. Plugins teach it about frameworks and libraries such as PHPUnit, and it has a web playground, IDE support and GitHub Actions for its checks and its security scan. The latest version needs PHP 8.2 or later and installs with Composer, as a Phar or as a Docker image built on a custom PHP build that runs it faster. Its repository is in Vimeo's GitHub organization and it's MIT-licensed; its maintainer, Daniil Gentili, sells support contracts.

## Links

- Website: https://psalm.dev/
- GitHub: https://github.com/vimeo/psalm
- Docs: https://psalm.dev/docs/

## Problems it solves

- find type errors in my PHP code before running it
- add static analysis to a legacy PHP codebase gradually, starting at a loose level
- detect SQL injection and XSS in PHP code by tracing user input
- automatically fix type annotations and simple bugs across a PHP project
- run PHP static analysis in GitHub Actions and show issues on pull requests
- use generics and array shapes in PHP docblocks and have them checked

## Features

- type checking with docblock generics and array shapes
- strictness levels from loose to strict
- taint analysis for SQL injection, XSS and other vulnerabilities
- automatic fixes for many issues
- plugins for frameworks and libraries
- online playground
- IDE support
- GitHub Actions for analysis and security scans (SARIF to code scanning)
- Composer package, Phar and Docker image
- PHPUnit plugin that checks data providers and stops false positives in test suites, built in from Psalm 7

## Capabilities

- Has a command line tool: plan not known
- Takes plugins: plan not known

## Trust

Overall: 0.74 out of 1.
Signals: maintenance 1.00, adoption 0.75, momentum 0.51, community 1.00, backing 0.30, extensibility 0.40.

- last commit 4 days ago
- 9460 commits in the last 90 days
- latest release 7.21.1 4 days ago
- 5.9k GitHub stars
- 517 contributors
- backed by Vimeo
- has a plugin system

## Alternatives

- [PHPStan](https://talira.ai/catalog/phpstan-5dffx9mn.md): PHP static analysis that finds bugs without running your code
- [Phan](https://talira.ai/catalog/phan-f1p4xx25.md): A static analyzer for PHP that minimizes false positives
- [Larastan](https://talira.ai/catalog/larastan-gxbmk034.md): Adds code analysis to Laravel, improving developer productivity and code quality
- [Psalm Laravel plugin](https://talira.ai/catalog/psalm-laravel-plugin-4q24xcnp.md): Laravel static analysis and taint-based security scanning for Psalm
- [WordPress Extensions for PHPStan](https://talira.ai/catalog/wordpress-extensions-for-phpstan-tn90qpfs.md): Static analysis for WordPress plugins and themes with PHPStan
- [mypy](https://talira.ai/catalog/mypy-b1eegf0c.md): Optional static typing for Python

## Sources

[^1]: https://psalm.dev/ (checked 26 Nov 2026)
[^2]: https://psalm.dev/support (checked 26 Nov 2026)
[^3]: https://github.com/vimeo/psalm/blob/master/LICENSE (checked 26 Nov 2026)
[^4]: https://psalm.dev/plugins (checked 26 Nov 2026)
