Skip to content

Released Rector 1.0.1

Compare
Choose a tag to compare
@TomasVotruba TomasVotruba released this 16 Feb 08:38
· 878 commits to main since this release

New Features 🥳

  • [Custom] Add "detect-node" command to help with writing custom rules (#5576)
  • [Config] Add registerService() method to allow container extension (#5591)
  • [TypeDeclaration] Add AddTestsVoidReturnTypeWhereNoReturnRector (#5611)
  • [PHP 8.0] Add always class to AnnotationToAttribute to include string to ::class reference conversion (#5619)
  • [CodeQuality] Add StaticToSelfStaticMethodCallOnFinalClassRector (#5621)

Bugfixes 🐛

  • ExplicitBoolCompareRector: skip phpdoc (#5567), Thanks @staabm!
  • Fix ArrayTypeMapper to handle arrays with UnionType items (#8225) (#5568), Thanks @pkvach!
  • [Configuration] Fix detect /vendor on root project on vendor analyzed on VendorMissAnalyseGuard (#5569)
  • Fix missing / suffix on VendorMissAnalyseGuard (#5571)
  • [PHP81] Skip after is_string on object call on NullToStrictStringFuncCallArgRector (#5572)
  • [Config] Make sure only one of type-declaration/dead-code or with*Level() is used to avoid duplicates (#5578)
  • Fix undefined MHASH_* constant on running downgrade from php 8.0 (#5585)
  • [NodeTypeResolver] Ignore PHPStan internal error on PHPStanNodeScopeResolver on NodeScopeResolver::processNodes() (#5586)
  • [Php81] Skip possible array on NullToStrictStringFuncCallArgRector (#5587)
  • [Php81] Skip another possible cast array to string on NullToStrictStringFuncCallArgRector (#5589)
  • [Transform] Allow class const fetch value on rules() on RectorConfigBuilderRector (#5596)
  • [Performance] Use strlen() early before loop on VendorMissAnalyseGuard (#5597)
  • Copy subtype phpdoc on ClassPropertyAssignToConstructorPromotionRector (#8438) (#5603), Thanks @pkvach!
  • config method must be static, to avoid creating rule before loading related ctor services (#5606)
  • fix config for configured rule (rectorphp/rector-src@5edb023)
  • [PHP 8.0] Fix annotation to attribute in case of FQN class without () (#5609)
  • [Php80] Support windows new line line DoctrineAnnotationDecorator::LONG_ANNOTATION_REGEX (#5610)
  • [Php81] Handle after open parentheses on AnnotationToAttributeRector (#5613)
  • [BetterPhpDocParser] Move split new line with @\ to regex to support windows new line (#5615)
  • [Php81] Handle nested Fqcn UniqueConstraint on NestedAnnotationToAttributeRector (#5614)
  • [DX] Accept Y/y for confirmation of init config (#5616)
  • [CodeQuality] Skip private static call from static:: on LocallyCalledStaticMethodToNonStaticRector (#5620)
  • [PostRector] Skip remove unused imports on used in multiple docs in single node (#5604)
  • [DeadCode] Skip sub type false => bool on RemoveUselessVarTagRector (#5588)

Removed 💀

  • [DeadCode] Skip with magic __get() on RemoveUnusedPromotedPropertyRector (#5573)
  • [DX] Remove phpstan strict rules to ease contributing (#5579)
  • [DX] Remove type covarege, as handled by phpstan itself (#5583)
  • [DeadCode] Handle used in assign return on RemoveUnusedPrivatePropertyRector (#5608)