github rectorphp/rector 0.14.0
Released Rector 0.14

latest releases: 1.2.10, 1.2.9, 1.2.8...
2 years ago

First, we're just passed great achievement. Rector has pased over 10 000 000 downloads 🎉 🥳

Thank you for joining us on this adventurous journey. Slowly but surely we're removing legacy code from codebases all over the world 🙏 👍


2 Community Packages

In Rector 0.14, 2 Rector extensions have matured enough to become standalone packages. We've decided to move them from the core closer to their own communities. Where they can grow faster and with inline of their community standards 👍 👪

Typo3 and Nette are now moved from Rector core to their own repositories:

Read more about it in a post from our blog.


New Features 🥳

  • [tests] Add Ability to yield files with names (#2732), Thanks @Wirone!
  • [TypedDeclaration] Add MockObject property type support to TypedPropertyFromAssignsRector (#2737)
  • [TypeDeclaration] Make anonymous class return specific type, if implements (#2738)
  • Improve ReturnTypeWillChangeRector to handle any method of defined type; move PhpDocFromTypeDeclarationDecorator to Downgrade rules (#2754)
  • [Php73] Add Method Call support on on IsCountableRector (#2762)

Bugfixes 🐛

  • [Php80] Skip default no stmt next is case on ChangeSwitchToMatchRector (#2728)
  • [DeadCode] Skip RemoveAlwaysTrueIfConditionRector on property use by @var docblock on Trait (#2729)
  • [Php80][TypeDeclaration] Handle UnionTypesRector+AddArrayReturnDocTypeRector on auto import FullyQualified doc (#2730)
  • [DeadCode] Handle assign in If_ cond on RemoveUnusedNonEmptyArrayBeforeForeachRector (#2734)
  • [Php80] Preserve int key defined not start from 0 on AnnotationToAttributeRector (#2735)
  • [TypeDeclaration] Skip data providers in AddArrayReturnDocTypeRector, they're overly complex and not helpful to type (#2736)
  • [CodingStyle] Fix re-print of self in PreferThisOrSelfMethodCallRector (#2759)
  • [Php54][Php80] Handle no scope on LongArrayToShortArrayRector+AnnotationToAttributeRector (#2749)
  • [Php81] Skip Encapsed on NullToStrictStringFuncCallArgRector (#2744)
  • [CodeQuality] Skip not ArrayType on ForeachItemsAssignToEmptyArrayToAssignRector (#2752)
  • AddReturnTypeDeclarationBasedOnParentClassMethodRector fix mixed return type by parent interface (#2755), Thanks @MartinMystikJonas!
  • [Php73] Skip escaped Dash on RegexDashEscapeRector (#2753), Thanks @ebrigham1!
  • [CodeQuality][Up_TO_PHP_81] Handle crash indentation on combination LevelSetList::UP_TO_PHP_81 with SetList::CODE_QUALITY (#2760)
  • [Php81] Handle crash on Crypt() single arg on NullToStrictStringFuncCallArgRector (#2767)
  • [Php80] Handle trailing comma on AnnotationToAttributeRector on Doctrine JoinColumn (#2766)
  • [CodeQuality][Up_TO_PHP_81] Handle crash indentation on combination LevelSetList::UP_TO_PHP_81 with SetList::CODE_QUALITY - take 2 (#2763)
  • [DeadCode] Fix RemoveUnusedPrivateMethodParameterRector args keys re-order (#2770)
  • [Php55] Handle no quote in backslash on PregReplaceEModifierRector (#2771)
  • Make ServiceGetterToConstructorInjectionRector report only if node has changed, retarget to Class_ node with higher priority (#2772)

Doctrine Rector 🟠

  • Add set to convert gedmo annotations to attributes (#117) - Thanks @acrobat
  • Add DoctrineTargetEntityStringToClassConstantRector (#98) - Thanks @dritter

Symfony Rector 🎼

  • Skip non-direct inheritors for AbstractType in RemoveDefaultGetBlockPrefixRector (#219)
  • Handle single action with __construct on InvokableControllerRector (#218)
  • [Symfony 2.5] Add AddViolationToBuildViolationRector (#211)
  • [Symfony 2.8] Add ServiceSetStringNameToClassNameRector for fluents configs (#213)
  • [Symfony60] Fix added return type for Router::getRouteCollection (#207) - Thanks @kick-the-bucket

Don't miss a new rector release

NewReleases is sending notifications on new releases.