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>threadTintogetName()/invoke()return types. (c44dc8f) object&callabletype: invokable classes are accepted viahas-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&Bof unions/iterables computed, e.g.(int|bool)&(int|float)→int. (#1945, 353ed77, 7dd3d61) do/whilenull-narrowing: the loop condition now narrows the body on re-entry. (#1947, db10237)- Undocumented
__callreturn: inferred from__call's declared return instead ofmixed. (131537a)
Codex
public-properties-of: resolves inherited props,@typealiases, and generic-parameter selectors. (#1928, #1929, ce5eea6)- Transitive
@mixin: methods resolve across mixin chains. (#1915, e6d9304) - Nested templates: params inside
class-stringand$thisin@extends/@implementsnow resolve. (#1924, f2fff71, 5eda2e0) - Patched method signatures: abstract/concrete mismatches in method patches no longer flagged. (#1940, c370be3)
Formatter
nulllast 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/staticrebinds: no falseno-parameter-shadowing/no-dead-store. (#1910, #1911, 4ccc4f5)
Syntax
- Class-name keyword casing:
resource/integerno 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
.1Eare 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.tomllinks 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
Database
🏗️ Internal
Language Server
- Experimental language server removed from the distribution, it is now available on the
feat/language-serverbranch. (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_THREADStests: no longer fail when the env var is set. (#1895, e2a9d31)- Dependencies: bump
tarto 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:
- @Ocramius: #1945
- @DanielBadura: #1947
- @lyrixx: #1939
- @ddanielou: #1928, #1929, #1902
- @joshrai: #1924
- @yoannblot: #1915
- @AJenbo: #1919, #1914
- @Brammm: #1913
- @UweOhse: #1910, #1911
- @adam-ja: #1904
- @Plastonick: #1898
- @simbig: #1854
- @LocalHeroPro: #1846
- @maximal: #1835
- @MartkCz: #1193
Full Changelog: 1.29.0...1.30.0