Skip to content

Released Rector 2.9.2

Latest

Choose a tag to compare

@TomasVotruba TomasVotruba released this 24 Nov 23:35

Bugfixes 🐛

  • [CodeQuality] Remove NarrowPreviousExceptionCodeArgRector, as it changes getCode() of new exception to 0 (#9062), reported in #9061

    PHP does not inherit the code from the previous exception, so new X('msg', previous: $e) returns 0 from getCode(), not $e->getCode(). The rule was part of the named-args set and code quality level in 2.9.0. If you registered it manually, remove it from your config.

  • [CodeQuality] Restore adding code with named previous: argument in ThrowWithPreviousExceptionRector (#9063)