Mago 1.12.1
This is a patch release with bug fixes for the analyzer and formatter.
🐛 Bug Fixes
Analyzer
- False positive
duplicate-array-keywith spread operator: Fixed a false positive where explicit keys following a spread expression (e.g.,[...self::DEFAULTS, 'title' => 'Override']) were incorrectly flagged as duplicate keys. Overriding spread keys with explicit entries is a common PHP pattern and is no longer reported (#1215)
Formatter
- Parentheses stripped from non-associative comparison chains: Fixed a bug where the formatter removed necessary parentheses from chained comparison expressions (e.g.,
($a === 'b') === $cwas flattened into the invalid$a === 'b' === $c). PHP declares comparison operators as non-associative, so chaining them without parentheses is a parse error (#1216) - Attribute formatting for anonymous classes: Fixed inconsistent formatting of attributes on anonymous classes. Attributes are now correctly placed on the next line after the
newkeyword, aligning with the PER-CS specification (#1115, #1210)
🏗️ Internal
- Specified Rust edition in
.rustfmt.toml(#1212) - Updated dependencies
🙏 Thank You
Contributors
A huge thank you to everyone who contributed code to this release:
Issue Reporters
Thank you to everyone who reported issues that shaped this release:
Full Changelog: 1.12.0...1.12.1