Mago 1.40.2
A patch release fixing analyzer false positives around property narrowing across calls and match subjects, two PHPDoc inline-code and conditional-type parsing fixes, plus new diagnostics for unsetting readonly/hooked properties and invalid trait as modifiers.
✨ Features
Analyzer
Semantics
- Trait
asmodifiers: a non-visibility modifier in a traitasadaptation (e.g.as final) is now rejected. (e3d9437)
🐛 Bug Fixes
Analyzer
matchafter impure call: a property used as amatchsubject no longer widens tomixed. (#2014, c9e5cc9)- Narrowing across calls: passing
$obj->propno longer drops narrowings on sibling properties. (#2015, 2e9a529) - Readonly writes: outside writes to a readonly property report a readonly violation, not a visibility one. (5eb7068)
PHPDoc Syntax
- Inline code spans:
//and quotes inside backticks are literal, not an "unclosed code" error. (95b393d) - Parenthesized conditionals:
($x is Y ? A : B)return types parse correctly again. (3a8d627)
🙏 Thank You
Issue Reporters
Thank you to everyone who reported issues that shaped this release:
Full Changelog: 1.40.1...1.40.2