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
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
elseandelseif. (#2150, #2237, 03d9726) - Tiny print widths: prevents table-style layout underflow. (#2242, 098540e)
- Numeric concatenation: avoids redundant operand parentheses. (#2246, c581aa7)
Prelude
🏗️ Internal
Analyzer
🙏 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:
- @diegobanos: #2150
- @vkunz: #2239, #2240
- @MichaelOwenDyer: #2249, #2250
- @devin-ai-integration[bot]: #2255
- @kamil-tekiela: #2254, #2256, #2258, #2259
Full Changelog: 1.47.3...1.47.4