Skip to content

Released version 4.2.4

Latest

Choose a tag to compare

@dg dg released this 26 Oct 22:18
· 16 commits to master since this release

🐛 Bug Fixes

  • fromCode() now keeps a file comment placed before declare(strict_types=1) (#182)
  • Extracting method and property hook bodies ignores the members of anonymous classes nested inside them
  • PropertyHookType is now an alias of PropertyAccessMode, so both enums are interchangeable wherever hooks are added or looked up

🛡️ Robustness

  • Invalid declarations now report a clear error when printed: a readonly property that is static or has a default value, a final private constant, an abstract final property hook, and an enum whose backing type is not int or string or whose case values do not match it
  • setHooks() validates hook types, and the presence of php-parser 5 is detected reliably, with a clear message when an older version is installed