Skip to content

Released Rector 1.0.5

Compare
Choose a tag to compare
@TomasVotruba TomasVotruba released this 10 May 07:46
· 48 commits to main since this release

New Features 馃コ

  • [TypeDeclarations] Add IncreaseDeclareStrictTypesRector to raise level of declare() coverage (#5849)

Bugfixes 馃悰

  • ExplicitReturnNullRector should skip never return (#5802), Thanks @staabm!
  • Make Compatible with phpstan 1.11.x code (#5804)
  • [CodeQuality] Skip Always return in try catch with finally on ExplicitReturnNullRector (#5807)
  • [CodeQuality] Skip never type on default switch on ExplicitReturnNullRector (#5808)
  • [CodeQuality] Skip while(true) always returned on ExplicitReturnNullRector (#5810)
  • [TypeDeclaration] Skip maybe not returned on while on ReturnUnionTypeRector (#5812)
  • [Php81] Skip on property and class const on FirstClassCallableRector (#5813)
  • [Php81] Skip __invoke() usage from non-class code on FirstClassCallableRector (#5816)
  • [Php81] Skip always string if else DomElement on NullToStrictStringFuncCallArgRector (#5822)
  • [TypeDeclaration] Handle crash on @mixin usage on ReturnTypeFromStrictTypedCallRector (#5823)
  • [Php81] Skip mixed type on ArrayDimFetch on NullToStrictStringFuncCallArgRector (#5826)
  • Fix original quotes in PregReplaceEModifierRector (#5827)
  • [CodeQuality] Skip $counter variable exists on ForRepeatedCountToOwnVariableRector (#5828)
  • [Php81] Use PHPStan ParametersAcceptor to detect allowed argument types on NullToStrictStringFuncCallArgRector (#5829)
  • [Renaming] Skip func call name on RenameClassRector (#5833)
  • Support NullSafeMethod calls in unused-code analysis (#5838), Thanks @staabm!
  • Support NullSafeProperty fetches in unused-code analysis (#5839), Thanks @staabm!
  • Ignore phpdoc type in RecastingRemovalRector (#5841), Thanks @staabm!
  • [Naming] Skip DateTime as individual in name resolver (#5842)
  • [Experiment] Rework child classes detection on DynamicSourceLocatorProvider (#5735)
  • [Printer] Handle Strip left spaces from opening tags on namespaced PHP + HTML content (#5851)
  • [CodeQuality] Fix tautology transformation on identical check on SimplifyTautologyTernaryRector (#5854)
  • [CodeQuality] Skip dynamic second arg or has uppercase second arg on SimplifyStrposLowerRector (#5855)
  • [NodeTypeResolver] Use existing DefaultReflector::reflectAllClasses() method on DynamicSourceLocatorProvider (#5856)
  • [EarlyReturn] Skip with AssignOp on PreparedValueToEarlyReturnRector (#5857)
  • [TypeDeclaration] Handle array with index assigned on TypedPropertyFromAssignsRector (#5861)
  • [TypeDeclaration] Handle return by array shape type on AddArrowFunctionReturnTypeRector (#5815)
  • [CodeQuality] Add Function_ and FuncCall support on OptionalParametersAfterRequiredRector (#5835)
  • [Php83] Handle default native constant on AddTypeToConstRector (#5843)
  • [PHP 7.2] Add error suppres support to each() rule (#5844)
  • [TypeDeclaration] Skip more detailed type on AddMethodCallBasedStrictParamTypeRector (#5866)
  • [DeadCode] Skip $this instanceof in Trait on RemoveAlwaysTrueIfConditionRector (#5817)
  • [DeadCode] Skip $this in trait on RemoveDeadInstanceOfRector (#5818)