github carthage-software/mago 1.43.0
Mago 1.43.0

3 hours ago

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

  • sqlsrv extension: added function and constant stubs for the sqlsrv extension. (#2045, e8f1ed3)

🐛 Bug Fixes

Analyzer

  • is_callable narrowing: no more false invalid-callable after 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)
  • ::class array keys: no false invalid-array-index for literal class-string keys. (#2056, e0dc158)

Prelude

  • Named arguments: dropped @no-named-arguments from 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 ?><?php tag-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 AST references to CST. (#2034, 73a9ade)
  • Helix formatter: fixed the Helix formatter setup docs. (#2058, 15336f4)

🏗️ Internal

  • HIR groundwork: flat Node/NodeKind view 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-docblock and mago-type-syntax crates. (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:

Full Changelog: 1.42.0...1.43.0

Don't miss a new mago release

NewReleases is sending notifications on new releases.