Mago 1.41.0
Mago 1.41.0
A feature release adding call-site generic variance and a new no-duplicate-match-arm linter rule, alongside analyzer, codex, and PHPDoc fixes for implicit Stringable, do-while narrowing, @return nullability, and enum match exhaustiveness.
✨ Features
Linter
no-duplicate-match-arm: new rule flags amatcharm whose result duplicates an earlier arm. (#2027, a9b3775)
Type System
- Call-site generic variance:
covariant/contravariant/*type-argument modifiers parse and drive assignability. (#2025, c7ff981)
🐛 Bug Fixes
Analyzer
@returnnarrowing: a docblock@return intover native?intnarrows the return instead of re-addingnull. (#2020, dd8a54f)do-whileconditions: the loop body is narrowed by its condition on re-entry, likewhile. (#2029, 496cd0a)- Enum
matchexhaustiveness: a self-typed enum is treated as enumerable, fixing a false non-exhaustive report. (#2019, 6c72db0)
Codex
- Implicit
Stringable: a class declaring or inheriting__toString()now implicitly implementsStringable. (#2026, 7a81571)
PHPDoc Syntax
- Inline code spans: an inline
`code`span may cross continuation lines without an "unclosed code" error. (#2024, af95abc)
🏗️ Internal
- Dependencies: refreshed third-party dependencies. (14ac380)
- Toolchain: pinned nightly bumped to nightly-2026-06-27. (#2010, 9680310)
🙏 Thank You
Issue Reporters
Thank you to everyone who reported issues that shaped this release:
- @dragosprotung: #2019
- @mathroc: #2020
- @bendavies: #2024, #2025, #2026
- @maximal: #2027
- @silen-z: #2029
Full Changelog: 1.40.2...1.41.0