github rectorphp/rector 2.4.0
Released Rector 2.4.0

7 hours ago

New Features 🥳

  • chore: add SafeDeclareStrictTypesRector to code quality set (#7935), Thanks @calebdw!
  • [Caching] Add CacheMetaExtensionInterface for custom cache invalidation (#7933), Thanks @ruudk!
  • feat(php86): add min/max to clamp rector (#7942), Thanks @calebdw!

Bugfixes 🐛

  • [Php85] Do not convert to pipe on use directly of spread operator on NestedFuncCallsToPipeOperatorRector (#7938)
  • [Console] Allow short command "p" on ProcessCommand (#7931)
  • [Arguments] Skip self class const fetch inside this class target replacement on ReplaceArgumentDefaultValueRector (#7940)
  • [CodeQuality] Hnadle with negation binary op previous if on CombineIfRector (#7945)
  • [CodingStyle] Skip by reference required params on call inside on ArrowFunctionDelegatingCallToFirstClassCallableRector (#7949)

Removed 💀

  • [DeadCode] Skip pipe operator on RemoveDeadStmtRector (#7941)
  • [DeadCode] Handle crash on multi elseif on RemoveDeadIfBlockRector (#7946)
  • [DeadCode] Skip with assign to call with target has #[NoDiscard] attribute on RemoveUnusedVariableAssignRector (#7950)

rectorphp/rector-symfony 🎵

  • [CodeQuality] Handle different parameter type same name used on ControllerMethodInjectionToConstructorRector (#929)
  • [CodeQuality] Skip used by static closure use on ControllerMethodInjectionToConstructorRector (#928)
  • [Symfony61] Skip non static external class callable on MagicClosureTwigExtensionToNativeMethodsRector (#927), Thanks @wuchen90

rectorphp/rector-doctrine 🟠

  • Fix infinite loop check instanceof name check to use Name class (#481)

rectorphp/rector-phpunit 🟢

  • [PHPunit 9] Move AssertRegExpRector to phpunit 90 set with refactor to use assertMatchesRegularExpression/assertDoesNotMatchRegularExpression (#667)
  • [PHPUnit 9] Rename assertRegExp/assertNotRegExp to assertMatchesRegularExpression/assertDoesNotMatchRegularExpression on phpunit 90 set (#666)
  • Fix assert PHPStan on ConfiguredMockEntityToSetterObjectRector (#665)

Don't miss a new rector release

NewReleases is sending notifications on new releases.