Skip to content

Released Rector 0.12.22

Compare
Choose a tag to compare
@TomasVotruba TomasVotruba released this 28 Apr 00:07
· 4761 commits to main since this release

This release slowly moves towards RectorConfig to improve Rector isolation from your project and ease to configuration. You can read more about it here: https://getrector.org/blog/new-in-rector-012-introducing-rector-config-with-autocomplete

New Features 🎉

  • [DX] Update super old configure to RectorConfig (#2121)
  • [DX] Add RectorConfig upgrade rule to make upgrade easier :) (#2098)
  • Improve BetterNodeFinder::findFirstPrevious() to work without statements (#2136)
  • Invalidate errored files in cache, to avoid hiding errors (#2138)
  • [NodeCollector] Remove CurrentStmtResolver service (#2143), Thanks @samsonasik!
  • [DX] Add note warning about using old config (#2177), Thanks @dritter!
  • DowngradeMatchToSwitchRector adds Method and Function call support (#2173), Thanks @jrstanley!

Bugfixes 🐛

  • [Fix][InlineSimplePropertyAnnotationRector] Add test case and minor fix (#2096), Thanks @dorrogeray!
  • [TypeDeclaration] Skip union param type on AddArrayParamDocTypeRector (#2119), Thanks @samsonasik!
  • [TypeDeclaration] Skip return property not exists by ClassReflection on ReturnTypeDeclarationRector (#2134), Thanks @samsonasik!
  • [Php80] Handle named type on JMS\AccessType on AnnotationToAttributeRector (#2141), Thanks @samsonasik!
  • [DeadCode] Skip remove variable on switch use return after break on RemoveUnusedVariableAssignRector (#2145), Thanks @samsonasik!
  • [Php80] Skip different type cases cond on ChangeSwitchToMatchRector (#2147), Thanks @samsonasik!
  • Remove PREVIOUS_STATEMENT from StatementNodeVisitor (#2146)
  • Remove CURRENT_STATEMENT where not needed (#2149)
  • [Php74] Allow change protected property of final class when property only in current class on TypedPropertyRector (#2153), Thanks @samsonasik!
  • Remove uses nodes attribute - part #1 (#2155)
  • Disable StatementNodeVisitor (#2154)
  • Remove NamespaceNodeVisitor (#2167)
  • Decouple aliased object type specifier + updgrade to PHPStan 1.6 (#2170)
  • [DowngradePhp80] Add Static Call Support on DowngradeMatchToSwitchRector (#2175), Thanks @samsonasik!
  • Adds test for DowngradeMatchToSwitchRector match having true subject expression (#2176), Thanks @jrstanley!
  • [TypeDeclaration] Skip return type defined Closure on ReturnTypeDeclarationRector (#2179), Thanks @samsonasik!
  • [Doc] Document deprecated USE_NODES and CURRENT_STATEMENT constant to use existing method call when needed (#2181), Thanks @samsonasik!
  • [Doctrine][Nette][TypeDeclaration] Handle add __construct with no Scope on InitializeDefaultEntityCollectionRector+RenderMethodParamToTypeDeclarationRector (#2180), Thanks @samsonasik!