github carthage-software/mago 1.0.0-beta.4
Mago 1.0.0-beta.4

latest releases: 1.0.0-beta.10, 1.0.0-beta.9, 1.0.0-beta.8...
6 days ago

Mago 1.0.0-beta.4

Welcome to the 1.0.0-beta.4 release of Mago! This update is packed with significant formatter enhancements that make your code look even better, plus a nice quality-of-life improvement for the linter and some documentation polish. ✨


💅 Formatter

This release includes a major tune-up for the code formatter, focusing on stability and smarter formatting for complex expressions. Your code should now be more readable and consistently formatted across the board.

Key improvements include:

  • Smarter Method Chains: The formatter is now less likely to break method chains with short names (e.g., ->of(), ->to()), resulting in more compact and readable fluent interfaces. (Closes #334)
  • Safer Ternaries: Parenthesization for nested conditional (ternary/elvis) expressions has been made more accurate. This helps prevent bugs related to PHP's tricky operator associativity rules. (Closes #336)
  • Better match Expressions: Formatting for match expressions, especially those with multiple arms, has been improved.

✅ Linter

  • New Rule: no-nested-ternary: A new rule has been added to detect and warn against nested ternary expressions ($a ? $b : ($c ? $d : $e)). This encourages writing more readable code and helps prevent bugs related to PHP's confusing operator associativity rules.
  • Easier Configuration for assertion-style: You can now configure the assertion-style rule in your mago.toml file using the more intuitive values "self" or "$this".

📝 Documentation

  • The documentation has received a polish pass to improve casing, readability, and overall presentation. A big thank you to @innocenzi for the contribution (#337)!

Full Changelog: 1.0.0-beta.3...1.0.0-beta.4

Don't miss a new mago release

NewReleases is sending notifications on new releases.