Mago 1.44.0
A faster release with stronger dependent-type analysis, richer guard and linter configuration, and fixes across the CLI, formatter, analyzer, and semantics.
✨ Features
Analyzer
- Override return types: reports overriding methods that omit a declared return type. (#2100, 90c04c0)
Linter
no-missing-format-argument: detects missing format arguments. (#2062, 38857dd)missing-docsexclusions: supports configurable exclusions. (#2102, 4488055)- Disallowed symbol levels: configures levels for functions and type instantiations. (#2101, 34ed400)
Guard
@finalvalidation: supports the annotation during structure validation. (#2065, 78cbbf0)- Restrictions: supports dependency restrictions and public-method allowlists. (#2074, 8d6d359)
CLI
🐛 Bug Fixes
Analyzer
- Dependent types: resolve them across calls, partials, unpacks, and intersections. (a629700, a231709, 81be763)
- Integer conditions: preserve ranges for correct impossible and redundant-condition reports. (#2085, #2087, 2037b9a, 6d71045)
- Loop conditions: stabilize types and avoid false diagnostics in
do-whileiterations. (#2078, 0205e49, 7afc4eb) issetflow: retains unsafe access and try/catch uncertainty after failed checks. (#2076, #2096, b70350c, 23203e5)- Readonly initialization: accepts deferred initialization of readonly properties. (#2095, ad495bd)
- Magic methods: resolves
@methodcalls backed by inherited methods. (#2089, fda90f8) - Mixin receiver types: binds
$thisandstaticto mixin receivers. (#2086, 07086c5) - Property overrides: reports incomparable override types. (#2103, 80dbbfe)
- Dynamic property names: reports
$property, not$$property. (#2066, 5d2116d) - PHPDoc returns: permits
voidin nullable docblock return types. (#2081, #2082, cdfd166) - Optional shapes: recognises optional string-keyed shapes as lists. (#2073, b15f9e1)
Codex
- Enum case identity: distinguishes cases during type identity checks. (#2071, 683220c, 2637cf8)
- Backed enum values: preserves literal values from known
->valueaccess. (#2064, 45ad41b) - Trait bounds: accepts exact
@require-extendsclasses when validating traits. (#2069, 84c0766)
Semantics
Linter
Formatter
- Binary continuations: preserves indentation and
match-arm docblocks. (#2060, #2063, 3057c15) - Multiline chains: keeps short chains attached after receiver arguments wrap. (#1711, #2030, bc0090e)
- Aligned assignments: respects print width and indents continuations. (#2093, #2094, 035d956, 2923585)
Guard
CLI
Distribution
🏗️ Internal
Performance
- Formatter: reduces printer and pipeline overhead. (f6520a2, ed94713)
- Linter: reduces traversal and allocation overhead. (d818460)
- Project analysis: speeds up end-to-end analysis and word interning. (d473383, c0d27c6)
Toolchain
🙏 Thank You
Contributors
A huge thank you to everyone who contributed code to this release:
- @Norbytus: #2065
- @mvanhorn: #2030, #2097
- @dotdash: #2066, #2075, #2086, #2088, #2089, #2098, #2100, #2103
- @xHeaven: #2082
- @maximal: #2011
- @adam-ja: #2101, #2102
Issue Reporters
Thank you to everyone who reported issues that shaped this release:
- @simbig: #2060
- @dantleech: #2062
- @BafS: #2064, #2076, #2085, #2087
- @gsteel: #2069, #2072
- @ddanielou: #2071
- @zonuexe: #2073
- @bram-pkg: #2074
- @UweOhse: #2078
- @mathroc: #2081
- @mansurs: #2084
- @innocenzi: #1711
- @cweiske: #2090, #2093, #2094
- @Tastaturberuf: #2095
- @datahari: #2096
Full Changelog: 1.43.0...1.44.0