packagist phpro/grumphp v2.22.0

7 hours ago

Say hi to Mago 🦊

609256711-ca2962f1-2f77-483b-a809-ebe42706d1cf

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_format keeps your code style consistent
  • mago_lint catches style slips, smells, and likely bugs
  • mago_analyze does the deeper work: types, control flow, logic errors
  • mago_guard enforces 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 init

Then 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

New Contributors

Full Changelog: v2.21.0...v2.22.0

Don't miss a new grumphp release

NewReleases is sending notifications on new releases.