carthage-software/mago
Mago is an extremely fast PHP linter, formatter, and static analyzer written in Rust. It helps teams catch issues early, enforce consistent style, and improve code quality across projects, with multiple install options like script, Homebrew, Composer, and Cargo.
+++ title = "快速开始" description = "Mago 是什么、能做什么,以及接下来该看哪里。" nav_order = 10 nav_section = "指南" +++
Mago 是一款用 Rust 编写的 PHP 工具链。一个二进制文件即可覆盖通常需要三四个独立工具才能完成的工作流环节。
它包含:
整套工具以单一二进制运行,无需 PHP 运行时,无需 Composer 依赖,也无需安装 Java。典型的工作流是这样的:
mago init # 生成一份起步用的 mago.toml
mago lint # 检查风格与正确性问题
mago format # 按格式化器规则重写文件
mago analyze # 进行类型检查并发现逻辑 bug
mago init 配置流程。mago.toml 中每个选项的参考。How can I help you explore Laravel packages today?