Mago 1.47.5
Mago 1.47.5 improves conditional and nullsafe narrowing, class-string handling, constructor analysis, and wide-shape performance.
🐛 Bug Fixes
Analyzer
- Suppressed guards: narrows types through error-suppressed conditions. (#2268, f13467c)
- Root callable strings: resolves callables with a leading namespace separator. (#2274, #2283, da58581)
- Closure array checks: preserves closure types through negated array checks. (#2282, 2d316d5)
- Elseif reassignment: discards stale clauses after assignments in conditions. (#2277, aefba3d)
- Nullsafe receivers: preserves receiver narrowing through nullsafe property access. (#2261, edb7082)
- Parent constructors: resolves inherited declarations and cross-file initialization. (#2271, #2273, 95d6cd6, 62a418d)
- Exact assertions: preserves true and false one-way narrowing. (#2263, #2278, 1b7741e)
- Nullsafe assertions: applies multi-target assertions to nullsafe arguments. (#2287, 4bf8961)
- Union properties: reconciles union roots before nested property assertions. (#2295, 637b850)
- Foreach arrays: preserves sanitized array types through loops. (#2294, 8d063e9)
- Static properties: preserves declared types across logical AND. (#2293, de61ef7)
- Match assertions: applies conditional assertions in boolean match arms. (#2262, 63b663f)
- Negated unions: applies union assertions conjunctively. (#2251, c9fd26e)
- Null coalescing: continues analysis after an unreachable terminating RHS. (#2270, 850ad19)
Codex
- Class-string validation: rejects non-class scalars where
class-stringis required. (#2285, ad348fc) - List inference: combines empty arrays with lists without losing list shape. (#2281, 7568d72)
Prelude
- Class probes: accepts strings, models
$allow_string, and tests dynamic classes. (#2284, #2286, 6b73f42, a7a055c)
Formatter
🏗️ Internal
Performance
Maintenance
- Nightly Clippy: simplifies guard clauses for current linting. (#2269, 7ba104a)
- Pull request template: adds affected-area guidance. (#2272, 5ead238)
- Release versioning: automates patch and minor version bumps. (3ac6783)
- Rust dependencies: refreshes workspace dependencies. (d961fb7)
- Sponsors: refreshes the sponsor list. (cca4229)
🙏 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:
- @MichaelOwenDyer: #2251, #2261, #2262, #2263
- @bendavies: #2274, #2277, #2281, #2282, #2289
- @mathroc: #2278, #2287
- @kamil-tekiela: #2293, #2294, #2295
Full Changelog: 1.47.4...1.47.5