github carthage-software/mago 1.55.0
Mago 1.55.0

4 hours ago

Mago 1.55.0 continues the performance work across analysis, linting, type handling, and reporting. It adds custom Guard breach reasons and fixes generic return types, argument counts, and formatter stability.

Note

Support Mago

Does your company use Mago? Please consider sponsoring its development so we can keep fixing bugs and shipping releases.

Sponsor Mago ❤️

✨ Features

Guard

  • Perimeter reasons: adds custom notes for rules, restrictions, and layering breaches. (#2445, 7c80693)

🐛 Bug Fixes

Analyzer

  • Generic narrowing: preserves generic intersections when combining types after instanceof. (#2440, dcce51f)
  • Inherited returns: resolves generic PHPDoc returns without requiring @inheritDoc. (#2444, 766df9b)
  • Argument counts: accepts extra positional arguments when the function inspects them. (#2435, #2439, 890ba4b, 1e414f4)

Formatter

  • Cast comparisons: keeps cast-wrapped calls stable across formatting passes. (#2447, c39820e)
  • Condition layout: keeps multi-line conditions stable across formatting passes. (#2446, 4dbc8b2)

Names

  • Keyword calls: resolves clone, exit, and die globally, avoiding false Guard dependencies. (#2442, #2443, 25ee509)

📖 Documentation

Guard

  • Perimeter config: documents custom breach reasons in English, French, and Chinese. (#2445, 7c80693)

Formatter

  • Stable formatting: adds a check for unchanged output on later passes. (#2446, 4dbc8b2)

🏗️ Internal

Analyzer

  • Condition analysis: borrows contexts and reuses shared logical clauses. (e05541a, f212e0d)
  • Branch analysis: skips unchanged locals and avoids switch-case index maps. (439ab2c, 6c8b3d4)
  • Array access: reuses shared types and borrows nested-key types. (9fde2f2, 4f1dc43)
  • Superglobals: reuses maps keyed by interned names. (d2ce7a8)

Linter

  • Rule traversal: uses typed walkers for complexity checks and label scans. (53daa84, c929844)
  • Rule allocations: cuts temporary data in comment, PHPDoc, and function-name checks. (fd13d61, b45ded8)

Codex

  • Type operations: compacts type storage and cuts cloning and traversal allocations. (04410c4, a751413)

Algebra

  • Clause comparisons: skips needless comparisons and cuts hashing and copying. (42a8773)

Pipeline

  • Lint processing: avoids source copies and reuses issue buffers. (3e37de9)

Reporting

  • Report output: batches writes and renders rich diagnostics in parallel. (0797927)
  • Diagnostic text: borrows fixed messages to avoid allocations. (ead4308)

🧩 Extension Protocol

No protocol changes in this release.

🙏 Thank You

Contributors

Thank you to everyone who contributed to this release:

Issue Reporters

Thank you to everyone who reported issues that shaped this release:

Full Changelog: 1.54.0...1.55.0

Don't miss a new mago release

NewReleases is sending notifications on new releases.