github carthage-software/mago 1.30.0
Mago 1.30.0

9 hours ago

Mago 1.30.0

A release focused on generics and robustness: intersection types of generic parameters are now computed, generic reflection (ReflectionClass<T>) threads T into method-return inference, and a new fuzzing + Miri CI hardened the lexer and parsers against crashes, leaks, and quadratic blowups on malformed input. Also: vendor type patches, an object&callable type, and the usual analyzer, codex, formatter, linter, and CLI fixes.

✨ Features

Analyzer

  • Generic reflection: ReflectionClass<T>/ReflectionMethod<T> thread T into getName()/invoke() return types. (c44dc8f)
  • object&callable type: invokable classes are accepted via has-method<__invoke>. (#1902, 7efac3c)

Codex

  • Vendor type patches: a patches source overrides third-party types without editing vendor code. (#1873, dcfd38b)

Database

  • Explicit extensionless files: files named without an extension are loaded when listed explicitly. (#1916, 639f481)

🐛 Bug Fixes

Analyzer

  • Generic intersections: A&B of unions/iterables computed, e.g. (int|bool)&(int|float)int. (#1945, 353ed77, 7dd3d61)
  • do/while null-narrowing: the loop condition now narrows the body on re-entry. (#1947, db10237)
  • Undocumented __call return: inferred from __call's declared return instead of mixed. (131537a)

Codex

  • public-properties-of: resolves inherited props, @type aliases, and generic-parameter selectors. (#1928, #1929, ce5eea6)
  • Transitive @mixin: methods resolve across mixin chains. (#1915, e6d9304)
  • Nested templates: params inside class-string and $this in @extends/@implements now resolve. (#1924, f2fff71, 5eda2e0)
  • Patched method signatures: abstract/concrete mismatches in method patches no longer flagged. (#1940, c370be3)

Formatter

  • null last in unions: ordered last by default per PER CS 3. (#1835, 3e5d38c)
  • Comment before method chain: kept on its own line. (#1854, 1db1fa5)
  • Property-receiver chains: first method stays on the same line under same-line chain style. (#1193, 5ff2133)

Linter

  • FQ refs in namespace-less files: fully-qualified global class/function/constant references are flagged. (#1846, 53626d0)
  • global/static rebinds: no false no-parameter-shadowing/no-dead-store. (#1910, #1911, 4ccc4f5)

Syntax

  • Class-name keyword casing: resource/integer no longer collide with type keywords. (#1898, 899cbf3)
  • Identifier::last_segment: returns the last segment, not the first. (#1919, cadea52)
  • Interpolation perf & leaks: brace-interpolation scan is linear and string-aware; token-kind leak fixed. (#1914, 478aa81, a80e557)

Type Syntax

  • Malformed-input hardening: type parser is depth-guarded; invalid float tokens like .1E are no longer emitted. (5179f3f, 6baf0b1)

Twig Syntax

  • Malformed-input hardening: expression/statement parsing is depth-guarded and an arena leak is fixed. (f338622, 3972674)

CLI

  • Versioned docs URL: the generated mago.toml links to a versioned, non-404 docs page. (#1939, b120e6b)
  • Baseline on scoped runs: no false out-of-sync warning on filtered runs. (#1904, fdffae9)

Prelude

  • DateTime types: precise constant types and format() return type. (#1917, 70e6094)

Database

  • Vendor watcher: stops adding vendor-path files as host files. (#1912, f1eaf73)

🏗️ Internal

Language Server

  • Experimental language server removed from the distribution, it is now available on the feat/language-server branch. (131b34c)

CI / Tooling

  • Fuzzing & Miri: scheduled fuzz action and Miri job; fuzzers built for the gnu target so ASan links. (48a3cf1, b0dbd5f, 3b7f34b)
  • Stacked Borrows UB: word interner reads interned bytes via the raw entry pointer. (e9bd270)
  • Toolchain: workspace builds on Rust 1.96.0; routine nightly pins. (35e53c2, #1925)
  • MAGO_THREADS tests: no longer fail when the env var is set. (#1895, e2a9d31)
  • Dependencies: bump tar to 0.4.46. (#1920, b220deb)

🙏 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.29.0...1.30.0

Don't miss a new mago release

NewReleases is sending notifications on new releases.