github carthage-software/mago 1.0.3
Mago 1.0.3

12 hours ago

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|array no 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-function and prefer-static-closure rules
  • Fix prefer-anonymous-migration rule to correctly flag named migration classes
  • Strip leading backslash from use statement FQNs in no-redundant-use rule

Analyzer

  • Handle multiple docblocks before statements correctly (#818)
  • Detect Closure::bind scope changes for protected member access analysis

Text Edit

  • Detect overlapping edits when insert and replace operations share the same start offset

Prelude

  • Mark getimagesizefromstring second parameter as optional

Features

Linter

  • Add new no-assign-in-argument rule to detect assignments in call arguments (#821)

Analyzer

  • Detect Closure::bind scope changes, allowing accurate analysis of protected/private member access within rebound closures

Internal

  • Refactor formatter to use if let to fix unnecessary_unwrap warning (#781)

New Contributors


Full Changelog: 1.0.2...1.0.3

Don't miss a new mago release

NewReleases is sending notifications on new releases.