github rectorphp/rector 2.0.11
Released Rector 2.0.11

7 days ago

New Features 🎉

  • [TypeDeclaration] Handle nested method crashes on AddParamTypeBasedOnPHPUnitDataProviderRector (#6772)
  • [TypeDeclaration] Skip void return on callback docblock in AddArrowFunctionReturnTypeRector (#6780)
  • [Php84] Add AddEscapeArgumentRector (#6782)
    (#6790)
  • [dead-code] Add RemoveFilterVarOnExactTypeRector (#6792)
    @carlos-granados!
  • [Php84] Add NewMethodCallWithoutParenthesesRector (#6802)
  • [CodingStyle] Add FunctionLikeToFirstClassCallableRector (#6667), Thanks @peterfox!
  • [Rector Rule] Replace date, strtotime, and time calls with Carbon equivalents (#6749), Thanks @gollumeo!

Bugfixes 🐛

  • Fix AddReturnArrayDocblockBasedOnArrayMapRector (#6800), Thanks @carlos-granados!
  • Fix AddParamTypeBasedOnPHPUnitDataProviderRector (#6799), Thanks
  • [dx] Log rules registered in both withRules() and sets, keeping them once to avoid duplication (#6761)
  • Fix method name in StaticCallToMethodCallRector (#6789), Thanks @parth391!
  • Fix MultiDirnameRector (#6796), Thanks @carlos-granados!
  • Fix ConsecutiveNullCompareReturnsToNullCoalesceQueueRector (#6797), Thanks @carlos-granados!
  • Fix WrapReturnRector (#6798), Thanks @carlos-granados!
  • Fix ArgumentDefaultValueReplacer (#6795), Thanks @carlos-granados!
  • Fix ParamTypeByMethodCallTypeRector (#6803), Thanks @carlos-granados!
  • Fix nested alias unused import (#6807), Thanks @Myks92!
  • [CodeQuality] Improve SimplifyIfElseToTernaryRector to handle binary operations on the left (#6810)
  • Update AnonymousFunctionFactory to disallow superglobal variables in use statements (#6811), Thanks @bryannielsen!

Removed & Deprecations 🗑️

  • [deprecation] Add explicit warning to deprecated withPhpPolyfill() method and error on withPhpSets() misuse on PHP 7.4- projects
  • [DeadCode] Skip used-by-property hook on RemoveUnusedPromotedPropertyRector (#6765)
  • [DeadCode] Skip side-effect cases on RemoveDeadLoopRector (#6770)
  • [deprecated] Remove deprecated AbstractScopeAwareRector (#6791)



rectorphp/rector-symfony 🎵

  • [code-quality] Add RequestIsMainRector (#708)
  • [symfony 7.3] Add InvokableCommandRector - kick off (#707)
  • feat: Add Flysystem key support (#705), Thanks @dsdeboer
  • [CodeQuality] Enhance InlineClassRoutePrefixRector to concatenate name annotation/attribute (#704)

rectorphp/rector-doctrine 🟠

  • [BUNDLE-230] Add AddAnnotationToRepositoryRector rule (#375), Thanks @JohJohan
  • [ORM-300] Add CastDoctrineExprToStringRector (#372), Thanks @JohJohan
  • [ORM-213] Add replace method call support (#369), Thanks @JohJohan
  • [deprecated] Remove deprecated MakeEntityDateTimePropertyDateTimeInterfaceRector (#376)

rectorphp/rector-phpunit 🟢

  • [code-quality] Add RemoveDataProviderParamKeysRector (#469)
  • [CodeQuality] Add AddInstanceofAssertForNullableInstanceRector (#466)
  • [deprecated] Remove deprecated AssertCompareToSpecificMethodRector (#468)
  • [deprecated] Deprecate AssertCountWithZeroToAssertEmptyRector for better readability with explicit methods (#467)

Don't miss a new rector release

NewReleases is sending notifications on new releases.