Mago 1.28.0
A feature release led by sound generic type-checking in the analyzer: diamond merges, variance, bounds, Liskov substitution, and constructor arity are now all enforced. The linter gains five Laravel-focused rules, and the CLI picks up a version subcommand, a configurable version-drift-fail-level, and --remove-outdated-baseline-entries for pruning stale baseline entries. Internally, PHP source handling moves to a byte-native representation, retiring mago-atom in favour of mago-word and mago-bytes. The rest is a batch of analyzer and formatter fixes.
✨ Features
Analyzer
- Sound generic type-checking: enforces diamond merges, variance, bounds, Liskov substitution, and constructor arity. (5af93b3)
Linter
- Laravel rules: five rules for test assertions, queries,
fake(), casts, and validation. (#1838, #1837, #1836, #1834, #1833, 6156709)
CLI
versionsubcommand: prints the version, mirroring the--versionflag. (#1840, d93d75a)version-drift-fail-level: fail the run on minor or patch version drift, not just major. (#1864, 980dbfa)--remove-outdated-baseline-entries: prunes baseline entries that no longer match any issue. (#1865, d35e9d3)
🐛 Bug Fixes
Analyzer
redundant-type-comparisonfalse positives: impossible negated assertions are no longer flagged. (#1842, c52b5bd)- Template defaults at call sites: a template's declared default type is now applied at the call site. (#1856, e8d5a84)
Formatter
- Mid-line echo tags: indent alignment restored for echo tags that don't begin a line. (#1857, bae65db)
📖 Documentation
🏗️ Internal
Refactor
- Byte-native source handling: PHP source moves to bytes;
mago-atomreplaced bymago-wordandmago-bytes. (#1862, 2a1b5a9)
CI / Tooling
- Clippy fixes: applies the latest Clippy lint cleanups across the workspace. (ab624ca)
- Nightly toolchain pins: routine bumps, now on
nightly-2026-05-18. (#1845, #1855, #1858, #1860, #1863, 489e310)
🙏 Thank You
Contributors
A huge thank you to everyone who contributed code to this release:
Issue Reporters
Thank you to everyone who reported issues that shaped this release:
- @LocalHeroPro: #1838, #1837, #1836, #1834, #1833
- @Zuruuh: #1864, #1865
- @maximal: #1840
- @bendavies: #1842
Full Changelog: 1.27.1...1.28.0