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
Reporting
🐛 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
@extendsand@implementsin 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()andpreg_match_all(). (#2205, #2350, 3df9f9c) - Runtime class checks: preserves correlated unions after
is_a()and::classchecks. (#2352, 0aa7d51) - Pure getters: applies PHPDoc assertions to stable method results before their first call. (#2335, 435a6e7)
Codex
PHPDoc Syntax
- Nested assertions: preserves full property and method targets in PHPDoc assertions. (#2319, #2322, 13bc480)
Prelude
Formatter
- Ignore regions: prevents OOM and output corruption from malformed heredoc ignore ranges. (#2346, #2347, 6a152c1)
- Ignored nodes: honors
empty-line-after-usebefore@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
🏗️ 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:
- @bendavies: #2288, #2291, #2323, #2324, #2330, #2331
- @SanderMuller: #2333, #2334
- @shadowhand: #2320
- @simon-mundy: #2336
- @Bleksak: #2341
- @pierreedbrg: #2299
- @MichaelOwenDyer: #2319, #2335
- @kamil-tekiela: #2235
- @BafS: #2205, #2343
- @Scarbous: #2346, #2347
- @landure: #2348
- @gsteel: #2352
- @Kenneth-Sills: #2342
- @ddanielou: #2228
Full Changelog: 1.47.6...1.48.0