Mago 1.0 Ships a Rust-Powered Linter, Formatter, and Static Analyzer for PHP
Mago, the PHP toolchain built in Rust by Carthage Software, reached its 1.0.0 stable release after a long road: more than 1,000 commits, 12 alpha releases, 34 betas, and 13 release candidates. It bundles a linter, a code formatter, a static analyzer, and an architectural guard into a single compiled binary — and the headline reason it's getting attention is speed.
What's actually in the box
Mago isn't one tool wearing several hats loosely; it's four distinct capabilities sharing one parser and one execution pipeline:
- A static analyzer that catches type errors and likely bugs before runtime, in the spirit of PHPStan or Psalm.
- A linter with configurable rules for code quality issues beyond pure type checking.
- An architectural guard, for enforcing boundaries like "this namespace may not depend on that one" — the kind of rule teams usually enforce with Deptrac or hand-rolled CI scripts.
- A formatter, in the same space as PHP-CS-Fixer or Laravel Pint.
Having all four share a single Rust-based parser instead of four separate PHP-based tools each parsing your codebase independently is where the performance story comes from.
The performance numbers
The benchmark getting circulated is specific and checkable: on a 500-file Laravel project, mago check completes in under a second, where phpcs on the same codebase takes 8 to 12 seconds. Comparisons against PHPStan for static analysis show a similar gap — reports describe Mago running roughly an order of magnitude faster on equivalent checks. For a large monorepo where CI runs static analysis and formatting checks on every push, that's the difference between a lint job that's a rounding error in your pipeline and one that's a noticeable chunk of your build time.
Where it fits next to Pint and PHPStan
Mago isn't asking teams to rip out existing tooling overnight — a formatter and a static analyzer both need broad community rule coverage and IDE integration maturity to fully replace entrenched tools, and Mago is 1.0, not battle-tested across every edge case Pint and PHPStan have accumulated fixes for over years. Where it's an easy immediate win is the architectural guard, which doesn't really have a PHP-native equivalent as fast or as tightly integrated, and as a formatter/linter for large codebases where CI time is a genuine pain point.
# Typical usage once installed
mago check # static analysis
mago lint # linter rules
mago format # code formatting
Should Laravel teams try it now
If your CI pipeline's PHPStan or PHP-CS-Fixer step is a bottleneck, Mago is worth a trial run specifically on that bottleneck rather than a wholesale replacement of your existing toolchain on day one. A 1.0 release from a project with this many pre-release iterations behind it is a reasonable signal of stability, but "reasonable signal" still means running it in parallel with your existing checks for a release cycle or two before trusting it as the sole gate on a production deploy.