Say hi to Mago 🦊
GrumPHP just made a new friend. Starting this release, you can run Mago straight from your hooks.
Mago is a PHP toolchain written in Rust. The name means "wizard," which fits: it does the work of four tools at once. A formatter, a linter, a static analyzer, and an architectural guard, all in a single fast binary. It's already showing up in places like Drupal.
We didn't bolt it on as one big task. Each part gets its own, so you turn on only what you want and configure them separately:
mago_formatkeeps your code style consistentmago_lintcatches style slips, smells, and likely bugsmago_analyzedoes the deeper work: types, control flow, logic errorsmago_guardenforces your architecture and layer rules
Format, lint, and analyze run read-only by default. When one fails, GrumPHP offers to re-run it with fixes applied, so you stay in control. Guard only reports, because you can't auto-fix an architecture problem (Mago won't pretend otherwise).
Add it to your project like any other tool:
composer require --dev carthage-software/mago
vendor/bin/mago initThen point your grumphp.yml at whichever tasks you want. Full setup and options live in the Mago task docs.
The grump approves. Welcome to the family, Mago. 🧙🦊
What's Changed
- Add cache CLI options for eslint by @rodrigoaguilera in #1223
- Support git autosquash
amend!prefix in commit message task by @reynkonig in #1224 - Add Mago as task by @johnatas-x in #1216
New Contributors
- @rodrigoaguilera made their first contribution in #1223
- @reynkonig made their first contribution in #1224
- @johnatas-x made their first contribution in #1216
Full Changelog: v2.21.0...v2.22.0