github carthage-software/mago 1.41.0
Mago 1.41.0

latest release: 1.42.0
5 hours ago

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 a match arm 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

  • @return narrowing: a docblock @return int over native ?int narrows the return instead of re-adding null. (#2020, dd8a54f)
  • do-while conditions: the loop body is narrowed by its condition on re-entry, like while. (#2029, 496cd0a)
  • Enum match exhaustiveness: 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 implements Stringable. (#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:

Full Changelog: 1.40.2...1.41.0

Don't miss a new mago release

NewReleases is sending notifications on new releases.