Skip to content

Mago 1.40.2

Latest

Choose a tag to compare

@github-actions github-actions released this 24 Jun 23:47
1.40.2
19f3aa5

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

  • Invalid unset: unsetting a readonly or hooked property is now reported. (#2018, a24eb10)

Semantics

  • Trait as modifiers: a non-visibility modifier in a trait as adaptation (e.g. as final) is now rejected. (e3d9437)

🐛 Bug Fixes

Analyzer

  • match after impure call: a property used as a match subject no longer widens to mixed. (#2014, c9e5cc9)
  • Narrowing across calls: passing $obj->prop no 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