Skip to content

Mago 1.48.0

Latest

Choose a tag to compare

@github-actions github-actions released this 10 Sep 04:22
1.48.0
a86492e

Mago 1.48.0

Mago 1.48.0 ships MANA 1.1 with richer analyzer hooks, sharper type inference, safer formatting, and tighter PHP checks.

✨ Features

Analyzer

  • array_pad shapes: infers exact list shapes when the target size is known. (#2341, 7a3dba7)

Reporting

  • Relative editor paths: adds %rel_file% to editor URL templates. (#2299, d747922)

🐛 Bug Fixes

Analyzer

  • Generic property overrides: substitutes inherited templates before comparing property types. (#2324, #2325, c888b1b)
  • Callable objects: keeps valid object arms when narrowing with is_callable(). (#2333, f7dbdc8)
  • Class docblocks: honors @extends and @implements in all PHP attachment positions. (#2331, 1a5f625)
  • Class aliases: scans class_alias() declarations and resolves aliases at lookup sites. (#2323, 6ae0c3c)
  • Exact assertions: preserves one-way assertions across || and negated &&. (#2320, #2321, 0d451a8)
  • Object class strings: preserves templates when instantiating inferred class-string<T>. (#2330, 54871ae)
  • Reference loops: prevents type explosions during by-reference loop analysis. (#2336, e043db9)
  • array_multisort: handles variadic arrays and by-reference arguments correctly. (#2235, 9ef20b6)
  • PCRE delimiters: reports malformed patterns in preg_match() and preg_match_all(). (#2205, #2350, 3df9f9c)
  • Runtime class checks: preserves correlated unions after is_a() and ::class checks. (#2352, 0aa7d51)
  • Pure getters: applies PHPDoc assertions to stable method results before their first call. (#2335, 435a6e7)

Codex

  • Enum wildcards: accepts an enum where Enum::* denotes all of its cases. (#2343, 645529e)

PHPDoc Syntax

  • Nested assertions: preserves full property and method targets in PHPDoc assertions. (#2319, #2322, 13bc480)

Prelude

  • Reflection types: corrects missing and invalid types across Reflection stubs. (#2329, 9b3c26a)

Formatter

  • Ignore regions: prevents OOM and output corruption from malformed heredoc ignore ranges. (#2346, #2347, 6a152c1)
  • Ignored nodes: honors empty-line-after-use before @mago-format-ignore-next. (#2348, dfd69a8)
  • Trailing commas: respects the target PHP version in formatting and syntax checks. (#2345, 528efc3)

Linter

  • Array spread fixes: preserves array_merge() key behavior before suggesting spread syntax. (#2342, e406a75)

Syntax

  • Braced interpolation: rejects invalid {$value::class} interpolation. (#2228, e212bfe)

🏗️ Internal

Maintenance

  • Dependencies: refreshes workspace dependencies. (a9f609a)
  • Issue intake: auto-closes issues opened by AI agents. (5757b10)
  • Sponsors: refreshes the sponsor list. (6fcf8ea, 14d4ac0)

🧩 Extension Protocol

Analyzer (MANA 1.1)

  • Variable definedness: exposes defined, possibly defined, and undefined states to hooks. (#2334, 90d64ba)
  • Receiver assertions: lets extensions refine method receiver types after calls. (#2291, 9624596)
  • Callable names: lets extension signatures set the method name shown in diagnostics. (#2288, 8533947)

🙏 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:

Full Changelog: 1.47.6...1.48.0