github rectorphp/rector 0.13.9
Released Rector 0.13.9

latest releases: 1.2.0, 1.1.1, 1.1.0...
23 months ago

New Features 🎉

  • [CodingStyle] Add StaticArrowFunctionRector (#2657)
  • [CodingStyle] Add StaticClosureRector (#2658)
  • [Php80] Add implements interface support on single file on AddParamBasedOnParentClassMethodRector (#2660
  • [PHP 8.1] Extend MyCLabsMethodCallToEnumConstRector with getValue() and static call (#2695)
  • [PHP 8.1] Keep use stmts in MyCLabsClassToEnumRector enum (#2696)
  • Add AddReturnTypeDeclarationBasedOnParentClassMethodRector (#2666), Thanks @MartinMystikJonas!
  • [DX] Add input validation for method, property and function name to avoid invalid output ast (#2668)
  • Improve namespace names validation (#2670)

Bugfixes 🐛

  • [DeadCode] Skip global and static variable on RemoveJustVariableAssignRector (#2641)
  • [DeadCode] Skip global and static variable on ReturnEarlyIfVariableRector (#2642)
  • [StrictTypes] Add MethodCall/StaticCall to ExclusiveNativeCallLikeReturnMatcher (#2646)
  • [TypeDeclaration] Add assigned new to variable in ReturnTypeFromReturnNewRector (#2647)
  • DependencyClassMethodDecorator: Prevent duplication of arguments (#2643), Thanks @jtojnar!
  • [TypeDeclaration] Skip Type modified between Assign and Return_ on ReturnTypeFromReturnNewRector (#2650)
  • [TypeDeclaration] Skip modififed type between assign and return on ReturnTypeFromStrictNewArrayRector (#2651)
  • [Php74] Skip TypedPropertyRector on final class by @Final docblock (#2654)
  • [DeadCode] Handle crash on indirect parent BinaryOp on RemoveDuplicatedInstanceOfRector (#2656), #7293
  • [TypeDeclaration] Skip property exists in parent on TypedPropertyFromStrictConstructorRector (#2659)
  • Fix test to only resolve to known classes (#2663), Thanks @dritter!
  • Fix getter method property substitution when the readable types don't match. (#2667), Thanks @mad-briller!
  • [CodeQuality] Handle crash attribute used on trait on CallableThisArrayToAnonymousFunctionRector (#2675)
  • Attempt to fix incorrect doctrine table attribute values on php 8.1 (#2699), Thanks @acrobat!
  • [Transform] Handle crash string in EnumCase on StringToClassConstantRector (#2680)
  • Fix InlineArrayReturnAssignRector and ChangeReadOnlyPropertyWithDefaultValueToConstantRector collision (#2701)

Removed 🗑️

  • move ReturnTypeFromStrictTypedCallRector to enterprise (#2685)
  • [DX] Cleanup, Remove RepeatedLiteralToClassConstantRector, as very narrow use case; use rather phpstan + Remove ChangeLocalPropertyToVariableRector, as buggy and unreliable; better use PHPStan (#2686)
  • Remove UnwrapFutureCompatibleIfFunctionExistsRector as very niche and specific (#2688)
  • [CodingStyle] Deprecate PHPStormVarAnnotationRector, rather tokens responsibility (#2677)

Don't miss a new rector release

NewReleases is sending notifications on new releases.