Mago 1.50.0 adds mago fix to apply fixes across all four tools until no changes remain, alongside safer imports, better type analysis, and more flexible pragmas and guard patterns.
✨ Features
CLI
mago fix: runs guard, analyzer, linter, and formatter until fixes settle, with safety controls. (#2157, 7386092)
🐛 Bug Fixes
Analyzer
- Callable arrays: preserves
is_callable()narrowing for calls, closure conversion, offsets, and loops. (#2385, 18482c2) - Stringable names: supports
Stringableproperty names and variable-variable reads. (659446c)- Shoutout to Ondřej Mirtes (@ondrejmirtes), PHPStan’s creator, for sharing this in Roave’s Discord. I stole it for Mago! 😄
Linter
- Import conflicts: avoids fixes that shadow class names and asks for a manual alias. (#2136, 5d4ceea)
Guard
- Brace patterns: accepts brace alternatives in perimeter paths and symbol selectors. (#2372, #2373, e26e451)
Collector
- Pragma lists: accepts whitespace and repeated category prefixes in comma-separated issue codes. (#2109, 05f6818)
Prelude
preg_replace: preserves array key types and marks the replacement count as non-negative. (#2384, d894be8)
CLI
- CST exit codes: returns failure for parse errors while still printing the syntax tree. (116abff)
📖 Documentation
Guides
- Fixes and suppressions: documents
mago fixand pragma lists in English, French, and Chinese. (#2157, #2109, 7386092, 05f6818)
🏗️ Internal
Maintenance
- Nightly Clippy: uses
mul_addfor Kan defect scores and handles watch-mode exit codes. (044b765, 116abff)
🧩 Extension Protocol
No protocol changes in this release.
🙏 Thank You
Contributors
This release contains no merged external pull requests.
Issue Reporters
Thank you to everyone who reported issues that shaped this release:
- @adam-ja: #2157
- @bendavies: #2385
- @HaiTo: #2372
- @gsteel: #2109
- @umulmrum: #2136
- @Double-Ramzi: #2384
Full Changelog: 1.49.0...1.50.0