github carthage-software/mago 1.44.0
Mago 1.44.0

one day ago

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-docs exclusions: supports configurable exclusions. (#2102, 4488055)
  • Disallowed symbol levels: configures levels for functions and type instantiations. (#2101, 34ed400)

Guard

  • @final validation: supports the annotation during structure validation. (#2065, 78cbbf0)
  • Restrictions: supports dependency restrictions and public-method allowlists. (#2074, 8d6d359)

CLI

  • -y self-update: adds a shorthand for --no-confirm. (#2011, d231964)

🐛 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-while iterations. (#2078, 0205e49, 7afc4eb)
  • isset flow: 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 @method calls backed by inherited methods. (#2089, fda90f8)
  • Mixin receiver types: binds $this and static to mixin receivers. (#2086, 07086c5)
  • Property overrides: reports incomparable override types. (#2103, 80dbbfe)
  • Dynamic property names: reports $property, not $$property. (#2066, 5d2116d)
  • PHPDoc returns: permits void in 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 ->value access. (#2064, 45ad41b)
  • Trait bounds: accepts exact @require-extends classes when validating traits. (#2069, 84c0766)

Semantics

  • Enum magic methods: permits __call, __callStatic, and __invoke. (#2075, d0487f2)

Linter

  • Namespaced imports: prevents overlapping fixes in global function imports. (#2072, 9b40611)

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

  • @self: scopes permits to the active rule namespace. (#2084, 6a2a317)

CLI

  • Piped output: restores SIGPIPE handling, avoiding a panic with head. (#2090, #2097, 9e504a6)

Distribution

  • Composer package: excludes the repository-only tests suite. (#2098, 722e39b)

🏗️ 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

  • Rust: bumps the minimum Rust version to 1.97.0 and removes the nightly pin. (8c8262e, a43077b)

🙏 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.43.0...1.44.0

Don't miss a new mago release

NewReleases is sending notifications on new releases.