Mago 0.18.0 ๐ช
This release brings a plethora of improvements to both the formatter and linter, focusing on enhanced readability, flexibility, and robustness.
๐ Formatter Enhancements
- Tabular Array Formatting with Alignment ๐ (#127):
- Expanded support for expressions within Tabular arrays, now including function calls, static method calls, and class constant access.
- Fixed a critical width calculation issue for the Arabic word "ุงููู", ensuring correct alignment.
- Relaxed row size consistency requirements, allowing for tabular formatting even with minor inconsistencies.
- Consistent Property Hook Formatting ๐ฃ (#126):
- Property hooks (getters and setters) are now consistently broken into multiple lines, irrespective of
print_width
, enhancing readability. - The only exception is empty hook lists (
{}
), which remain on a single line.
- Property hooks (getters and setters) are now consistently broken into multiple lines, irrespective of
- Preserve Line Break Options ๐งฑ (#125):
- Introduced five new configuration options to give you fine-grained control over line breaks:
preserve_breaking_member_access_chain
preserve_breaking_argument_list
preserve_breaking_array_like
preserve_breaking_parameter_list
preserve_breaking_attribute_list
- These options allow you to maintain your preferred code structure.
- Introduced five new configuration options to give you fine-grained control over line breaks:
- Parentheses for Literal Numbers in Concatenation ๐ข:
- Added parentheses around literal integers and floats within concatenation binary operations for improved clarity.
๐ก๏ธ Linter Improvements
- New PSL Plugin ๐งฉ (#121):
- Introduced a new linter plugin dedicated to Psl (PHP Standard Library) checks, boosting code quality.
๐ ๏ธ CLI Improvements
- Enhanced
composer.json
Config Generation ๐ฆ:- In the
mago init
command, when generating configuration fromcomposer.json
, non-existent autoload paths are now automatically removed. - Redundant subpaths are also removed, leading to a much cleaner configuration.
- In the
- Config Parsing During Self-Update ๐:
- Fixed an issue where configuration parsing was incorrectly triggered during the
self-update
command.
- Fixed an issue where configuration parsing was incorrectly triggered during the
- Simplified Formatter Configuration โ๏ธ:
- Simplified the internal formatter configuration for better maintainability.
๐ค Community Contributions
A huge thank you to @bendavies and @innocenzi for their invaluable contributions! Your bug reports, suggestions, and feedback have been instrumental in improving Mago. Community feedback is what keeps Mago improving!
๐งน Other Changes
- Various chore and maintenance updates to keep things running smoothly.
Full Changelog: 0.17.0...0.18.0