Tools

Mago is one binary that bundles four tools. They share configuration, parser, and runtime, so you can use any combination without paying for tools you do not run.

Formatter

A deterministic code formatter. It produces stable, conventional output that follows PER-CS by default and supports presets for PSR-12, Laravel, and Drupal style. No configuration roulette, no debate.

Linter

A curated catalogue of rules covering correctness, consistency, clarity, redundancy, safety, security, and a few other concerns. Most issues come with an automatic fix. Framework integrations layer on rules specific to Symfony, Laravel, PHPUnit, Doctrine, and others.

Analyzer

A static analysis engine that catches type errors and logic bugs before runtime. Compatible with Psalm and PHPStan annotations, with support for generics, conditional types, and flow narrowing.

Architectural guard

Enforces dependency rules and structural conventions. Useful when you want to forbid certain use paths, codify layer boundaries, or assert that code in one part of the project never imports code from another.

↳ Edit this page →