github carthage-software/mago 0.26.1
Mago 0.26.1

latest releases: 1.0.0-beta.12, 1.0.0-beta.11, 1.0.0-beta.10...
2 months ago

Mago 0.26.1

Hello everyone,

This release introduces a new linter rule for best practices and a powerful new formatting option to improve code organization, alongside several key fixes for the formatter.

⭐ New Features

  • New Linter Rule: best-practices/no-sprintf-concatenation: A new rule has been added to discourage string concatenation with sprintf() calls (e.g., sprintf(...) . 'string'). The linter will now suggest incorporating the concatenated parts directly into the sprintf format string for better performance and readability. (#139)

  • New Formatter Option: separate_class_like_members: The formatter now inserts a single blank line between different kinds of members inside a class, trait, interface, or enum by default. This visually groups constants, properties, enum cases, trait uses, and methods, making complex class-like structures much easier to read. This behavior can be disabled by setting separate_class_like_members = false in your mago.toml file. (#223)

🛠️ Fixes & Improvements

  • Formatter: Made several improvements to how member access chains (e.g., $obj->foo->bar()) are formatted for better consistency and readability. (#218, #205)
  • Formatter: Fixed a bug where match expressions used within a string concatenation (.) were not formatted correctly. (#207)

Thank you for your contributions and for helping us improve Mago!


Full Changelog: 0.26.0...0.26.1

Don't miss a new mago release

NewReleases is sending notifications on new releases.