Mago 1.56.2 speeds up formatting and lowers its memory use, adds generic parent bindings in type patches, and fixes template resolution, closure defaults, array access, and Drupal formatting.
Note
Support Mago
Does your company use Mago? Please consider sponsoring its development so we can keep fixing bugs and shipping releases.
Sponsor Mago ❤️
✨ Features
Analyzer
- Generic patches: lets type patches replace bindings on existing parents and interfaces. (#2469, bcbd1bd)
🐛 Bug Fixes
Analyzer
- ArrayAccess writes: checks array syntax against the effective
offsetSet()value type. (#2473, 25af17d) - Object casts: infers
array<array-key, mixed>for object-to-array casts. (#2472, cc7e8e4) - Parent calls: resolves template bindings through the calling class. (#2467, 868a0c1)
- Closure defaults: avoids false redundant-coalesce warnings for nullable
??=closure assignments. (#2466, c3ead42) - Null defaults: infers nullable parameter types from
nulldefaults. (#2470, #2471, 53cecd0) - Template bounds: resolves forwarded defaults and bounds when type arguments are omitted. (#2459, #2460, e1e8189)
Formatter
- Binary continuations: keeps indentation stable across formatting passes. (#2464, 0879cdd)
- Comments and indentation: stabilizes chains,
echo, nested classes, and switch comments. (#2465, c923807) - Drupal preset: keeps lone value arguments inline and preserves logical parentheses. (#2216, 3774a31)
Prelude
- Class-name types: uses
class-stringfor class-name helpers and keepsfalsefor parent lookups. (#2468, 70bef87)
📖 Documentation
Configuration
🏗️ Internal
Formatter
- Formatting work: cuts source copies and allocations in layout checks and printing. (b9be9bc)
🧩 Extension Protocol
No protocol changes in this release.
🙏 Thank You
Contributors
Thank you to everyone who contributed to this release:
Issue Reporters
Thank you to everyone who reported issues that shaped this release:
- @alfredbez: #2459
- @amateescu: #2470
- @dragosprotung: #2466, #2467, #2468
- @jfilter: #2469, #2472, #2473
Full Changelog: 1.56.1...1.56.2