Mago 1.43.0
A fix-focused release clearing false positives across the analyzer, codex, linter, and formatter. is_callable narrowing, strict in_array, type-alias recursion, ::class array keys, no-dead-store, and member-access chains. Plus sqlsrv stubs and internal HIR groundwork for the upcoming rule-based checker.
✨ Features
Prelude
🐛 Bug Fixes
Analyzer
is_callablenarrowing: no more falseinvalid-callableafter narrowing to a callable type. (#2037, 938a511)- Strict
in_array: keeps the value's type on a negative result instead of wrongly excluding it. (#2048, 3a69d09) redundant-logical-operation: suppressed during loop pre-condition analysis. (#2054, 4b4a7d4)
Codex
- Enum generic narrowing: preserves generic type parameters when narrowing with enum type arguments. (#2035, 0c5fdad)
- Type-alias recursion: rejects aliases shadowing symbols and handles self-references, fixing a stack overflow. (#2050, cde8037)
::classarray keys: no falseinvalid-array-indexfor literal class-string keys. (#2056, e0dc158)
Prelude
- Named arguments: dropped
@no-named-argumentsfrom native functions that accept them. (#2043, 3e77dff)
Linter
no-dead-store: handles terminators and loop exits, clearing false positives. (#2052, #2053, 9f2eb74)
Formatter
- Member-access chains: formatting is idempotent with both preserve options. (#2032, 840cca4)
- Array-base parentheses: avoids redundant parens around a parenthesized array base. (#2038, da54dd7)
Syntax
- Heredoc interpolation: preserves token order for lossless reconstruction. (2a87bf6)
- Abstract methods: allows a
?><?phptag-pair terminator after an abstract method. (e5f81cb)
PHPDoc Syntax
- Docblock close marker: treats consecutive
*before/as one marker, fixing a lost intersection type. (#2055, 8749c2b)
📖 Documentation
- AST → CST: updated stale
ASTreferences toCST. (#2034, 73a9ade) - Helix formatter: fixed the Helix formatter setup docs. (#2058, 15336f4)
🏗️ Internal
- HIR groundwork: flat
Node/NodeKindview and PHP surface syntax carried through the IR for the upcoming rule-based checker. (11349fd, 94927e7) - Composite strings: unified composite/shell strings into one node with spans and heredoc/nowdoc kinds. (732ad8f, 6c880a8)
- Analyzer performance: removed duplicate hashing and redundant allocations. (5ae5198, 072933f, f71b732)
- Crate cleanup: removed the unused
mago-docblockandmago-type-syntaxcrates. (5deb957) - Toolchain: pinned nightly bumped through nightly-2026-07-05. (#2059)
🙏 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:
- @josephkerkhof: #2032, #2038
- @mhert: #2035
- @BafS: #2037, #2050
- @thorsten: #2039
- @mathroc: #2043
- @Lukkie: #2048
- @UweOhse: #2052, #2053, #2054
- @Ocramius: #2055
- @tyrsson: #2056
Full Changelog: 1.42.0...1.43.0