github carthage-software/mago 1.47.4
Mago 1.47.4

3 hours ago

Mago 1.47.4

Mago 1.47.4 improves numeric-string analysis, instanceof narrowing, formatter stability, and array-inference performance.

🐛 Bug Fixes

Analyzer

  • Instanceof with coalesce: narrows values guarded by ($value ?? null) instanceof T. (#2249, 889e259)
  • Nullsafe instanceof: narrows nullable receivers after nullsafe property checks. (#2250, b17a46f)
  • Loose numeric comparisons: models PHP integer-string coercion. (#2254, 0b424e8)
  • Readonly diagnostics: names readonly violations instead of visibility errors. (#2241, 7b103aa)
  • Integer-string keys: normalizes canonical strings to integer array keys. (#2259, 39b9577)

Codex

  • Array inference: prevents inferred array types from exploding in size. (#2256, 89a45de)

Linter

  • Subtraction from zero: suggests negating the right operand. (#2240, b302702)
  • Anonymous constructors: records variables passed to anonymous class constructors as used. (#2239, 8ff624e)

Formatter

  • Preserved conditions: keeps binary-condition indentation idempotent. (#2255, 3435bf3)
  • Method-chain semicolons: preserves spacing before else and elseif. (#2150, #2237, 03d9726)
  • Tiny print widths: prevents table-style layout underflow. (#2242, 098540e)
  • Numeric concatenation: avoids redundant operand parentheses. (#2246, c581aa7)

Prelude

  • array_sum: returns int|float for numeric-string arrays. (#2258, 4000b2f)

🏗️ Internal

Analyzer

  • Write visibility: centralizes effective write-visibility resolution. (#2238, e67a00e)

🙏 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.3...1.47.4

Don't miss a new mago release

NewReleases is sending notifications on new releases.