Mago 0.17.0 🪄
This release of Mago brings new linting rules for Laravel, more formatter options, and bug fixes!
Laravel Linting 🔎
- New Laravel rules: We've added three new linting rules to the Laravel plugin, helping you write cleaner and more idiomatic Laravel code (by @azjezz in #116):
- **
laravel/anonymous-migration
: Encourages the use of anonymous classes for migrations. - **
laravel/middleware-in-routes
: Enforces applying middleware in routes files instead of controllers. - **
laravel/view-array-parameter
: Promotes passing data to views using the array parameter in theview()
function.
- **
Formatter Enhancements 🛠️
- More control over formatting: Four new formatter options give you finer control over how your code is styled (by @azjezz in #114):
- **
array_table_style_alignment
: Enables or disables table-style alignment for arrays. - **
always_break_named_arguments_list
: Controls whether to always break named argument lists into multiple lines. - **
always_break_attribute_named_argument_lists
: Controls whether to always break named argument lists in attributes into multiple lines. - **
parentheses_in_attribute
: Controls whether to include parentheses in attributes when they contain no arguments.
- **
Bug Fixes 🐛
- Member access chain comments: Fixed a bug where comments in member access chains were printed after the access operator instead of before. (by @azjezz in #113)
- Match expression formatting: Fixed a bug that caused incorrect formatting of the
default
arm inmatch
expressions. (by @azjezz in #112) - Binary expression indentation: Fixed a bug that caused incorrect indentation of multi-line binary expressions within parentheses. (by @azjezz in #111)
- Arrow function formatting: Improved the formatting of arrow functions, including better handling of parentheses and argument list breaking. (by @azjezz in #109)
This release includes valuable additions and improvements for both the linter and formatter, making Mago an even more powerful tool for analyzing and styling your PHP code. Enjoy! 🎉
Full Changelog: 0.16.0...0.17.0