This release includes several bug fixes across the formatter, linter, analyzer, and prelude, along with new features.
As always, we'd love to hear from you! Please keep filing bug reports and feature requests - your feedback is what drives Mago forward.
Our team will be taking a well-deserved break over the holidays. Merry Christmas to those who celebrate, and happy holidays to everyone! We'll be back in full swing in the new year, but rest assured we'll still be keeping an eye out for any critical issues.
Bug Fixes
Formatter
- Fix idempotency issue with match expressions containing trailing comments on conditions
- Fix nullable union type formatting (e.g.,
null|arrayno longer causes formatting oscillation) - Fix call arguments breaking when containing wide binary expressions
- Avoid early return inside
wrap!macro to prevent node stack corruption
Linter
- Avoid overlapping edits between
prefer-arrow-functionandprefer-static-closurerules - Fix
prefer-anonymous-migrationrule to correctly flag named migration classes - Strip leading backslash from use statement FQNs in
no-redundant-userule
Analyzer
- Handle multiple docblocks before statements correctly (#818)
- Detect
Closure::bindscope changes for protected member access analysis
Text Edit
- Detect overlapping edits when insert and replace operations share the same start offset
Prelude
- Mark
getimagesizefromstringsecond parameter as optional
Features
Linter
- Add new
no-assign-in-argumentrule to detect assignments in call arguments (#821)
Analyzer
- Detect
Closure::bindscope changes, allowing accurate analysis of protected/private member access within rebound closures
Internal
- Refactor formatter to use
if letto fixunnecessary_unwrapwarning (#781)
New Contributors
- @chrisopperwall-qz made their first contribution in #821
Full Changelog: 1.0.2...1.0.3