github rectorphp/rector 2.0.4
Released Rector 2.0.4

latest release: 2.0.5
8 days ago

New Features 🥳

  • [PHP 8.0] Add lcfirst annotation to attribute support (#6577)
  • Add multiline comment fixture (#6580)
  • [TypeDeclaration] Add param type to array map closure (#6377), Thanks @peterfox!
  • [deprecation] Add message about deprecated MixedTypeRector rule, Remove deprecated SetListInterface as no longer used (#6590)
  • [Php81][php82] Add AttributeGroupNewLiner to make new line based on token on ReadOnlyPropertyRector and ReadOnlyClassRector (#6618)
  • [Php84] Add rule for RoundingMode enum (#6369), Thanks @jorgsowa!

Bugfixes 🐛

  • [dx] polyfill sets is running out of the box in php sets (#6591)
  • [phpstan] Fix var assumed ignored errors (#6571)
  • [phpstan] fix next ingored errors (#6572)
  • [CodeQuality] Handle crash on property hook on OptionalParametersAfterRequiredRector (#6575)
  • [PHP 8.0] Make AnnotationToAttributeRector return after 1st newline without slash (#6578)
  • [Php80] Fix end slash regex on AttributeValueResolver (#6579)
  • Fix annotation on doctrine one (#6582)
  • [Comments] Move left over clean empty doc handling to DocBlockUpdater (#6584)
  • fix: replace getKey method for name property (#6583), Thanks @carlosvinicius!
  • fix: replace getKey/getValue methods when enum is a variable (#6585), Thanks @carlosvinicius!
  • [Php80] Handle comment multi line on AttributeValueResolver (#6586)
  • [Php80] Use more proper check for doc comment multi lines on AttributeValueResolver (#6587)
  • [Php80] Handle value as argument with keep description as comment on AttributeValueResolver (#6589)
  • withRootFiles now apply rector for dotfiles too (#6592), Thanks @andrew-demb!
  • 📦 Ignore .phpstorm.meta.php because this is not PHP file (#6594), Thanks @andrew-demb!
  • [Php81] Skip reassign on array destruct on ReadOnlyPropertyRector (#6596)
  • [Php80] Handle crash on multi next stmts on ChangeSwitchToMatchRector (#6597)
  • [CodingStyle] Handle crash on pass args on CallUserFuncToMethodCallRector (#6598)
  • [Php81] Skip with next required on NewInInitializerRector (#6599)
  • Move FunctionLike reindex under StmtsAwareInterface on NodeAttributeReIndexer (#6605)
  • [DeadCode] Skip value variable used in throw stmts in catch on UnusedForeachValueToArrayKeysRector (#6607)
  • Revert "[Php80] Keep numeric string as is on StringAnnotationToAttributeMappe…" (#6609)
  • [Php54] Use token base replace on LongArrayToShortArrayRector (#6616)
  • [Performance] Only register WrappedNodeRestoringNodeVisitor() when there is found AlwaysRememberedExpr or Match_ node on processNodes() (#6620)
  • [Fix] Renamed gzwrites (undefined function) to gzwrite (#6622), Thanks @Vqcheslav!
  • [FunctionLike] Skip return by ref with switch on SimplifyUselessVariableRector (#6623)
  • Rollback SimpleCallableNodeTraverser usage on ByRefReturnNodeVisitor (#6624)
  • [TypeDeclaration] Skip assign on while cond on WhileNullableToInstanceofRector (#6628)
  • [TypeDeclaration] Skip assign in if condition on BinaryOpNullableToInstanceofRector (#6629)
  • Clean up ignore phpstan errors (#6630)
  • [DeadCode] Skip @return positive-int|0 on RemoveUselessReturnTagRector (#6576)
  • [DeadCode] Skip key variable used in throw stmts in catch on RemoveUnusedForeachKeyRector (#6606)

Removed 💀

  • Remove TypeNormalizer as type comparison is handled well by PHPStan (#6570)
  • Removed unused method ClassChildAnalyzer-> hasParentClassMethod() (#6595), Thanks @staabm!
  • [Experiment] Remove WrappedNodeRestoringNodeVisitor (#6626)

Don't miss a new rector release

NewReleases is sending notifications on new releases.