Psalm

用于在 PHP 应用程序中查找错误的静态分析工具。「A static analysis tool for finding errors in PHP applications」

Github星跟蹤圖

Psalm(诗篇)

Psalm 是一个静态分析工具,用于在 PHP 分析器 的基础上查找 PHP 应用程序中的错误。

它能够发现大量问题,但也可以配置为仅关注其中的一小部分。

尝试进行现场演示,或按照下面的《快速入门指南》将其安装在项目中。

Psalm 文档

文档可以从 docs 文件夹生成,也可在 Psalm 的网站 上找到。

要开始使用,请查看安装指南

有兴趣贡献吗?

看看 CONTRIBUTING.md

致谢

工程团队 @vimeo 给予鼓励和耐心,尤其是 @nbeliard, @erunion@nickyr

(The first version translated by vz on 2020.07.26)

主要指標

概覽
名稱與所有者vimeo/psalm
主編程語言PHP
編程語言PHP (語言數: 4)
平台BSD, Linux, Mac, Solaris, Windows
許可證MIT License
所有者活动
創建於2016-11-21 17:04:41
推送於2025-07-14 10:06:07
最后一次提交2025-07-14 12:05:57
發布數468
最新版本名稱7.0.0-beta11 (發布於 )
第一版名稱0.1 (發布於 )
用户参与
星數5.7k
關注者數59
派生數686
提交數15.6k
已啟用問題?
問題數7814
打開的問題數1822
拉請求數3097
打開的拉請求數70
關閉的拉請求數353
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

Packagist
Packagist
Travis CI
Coverage Status
Psalm coverage

Psalm is a static analysis tool for finding errors in PHP applications, built on top of PHP Parser.

It's able to find a large number of issues, but it can also be configured to only care about a small subset of those.

Try a live demo, or install it in your project by following the Quickstart Guide below.

Psalm documentation

Documentation is available on Psalm’s website, generated from the docs folder.

Quickstart Guide

Install via Composer:

composer require --dev vimeo/psalm

Add a config:

./vendor/bin/psalm --init

Then run Psalm:

./vendor/bin/psalm

The config created above will show you all issues in your code, but will emit INFO issues (as opposed to ERROR) for certain common trivial code problems. If you want a more lenient config, you can specify the level with

./vendor/bin/psalm --init [source_dir] [level]

You can also learn how to suppress certain issues.

How Psalm Works

A basic rundown of Psalm’s internals can be found in docs/how_psalm_works.md.

Acknowledgements

The engineering team @vimeo for encouragement and patience, especially @nbeliard, @erunion and @nickyr.