github rectorphp/rector 0.17.2
Released Rector 0.17.2

latest releases: 1.2.5, 1.2.4, 1.2.3...
15 months ago

In this release we continue preparing for Rector 1.0 release #7854

This includes:

  • removing more parent node connections, to lower node tree memory consumption

New Features 🥳

  • Add sleep after processPool->quitAll() to give time for all child processes to terminate (#4280), Thanks @dorrogeray!
  • [TypeDeclaration] Add NumericReturnTypeFromStrictScalarReturnsRector (#4296)
  • [Php71] Add Closure support on AssignArrayToStringRector (#4303)
  • Introduces AddSensitiveParameterAttributeRector rule (#4342), Thanks @peterfox!
  • Bump nikic/php-parser to 4.16.0 (#4343)
  • Show error when no files will be processed (#4326), Thanks @staabm!
  • Cache unchanged files on dry run v2 (#4281), Thanks @dorrogeray!

Bugfixes 🐛

  • [CodeQuality] Handle crash on variable variable on OptionalParametersAfterRequiredRector (#4226)
  • Fix LocallyCalledStaticMethodToNonStaticRector with method args (#4233), Thanks @toastedghost!
  • Use FunctionLike contract instead of union of function-like concrete implementations (#4241), Thanks @Wirone!
  • [CodeQuality][Performance] Reduce repetitive NodeTypeResolver->getType() on ExprBoolCaster (#4279)
  • Skip rewindable generator (#4282)
  • [Php55][NodeTypeResolver] Handle crash on dynamic variable concat assign on StringClassNameToClassConstantRector (#4283)
  • [Php55] Clean up FullyQualified assigned to FullyQualified on StringClassNameToClassConstantRector (#4284)
  • [TypeDeclaration] Extend NumericReturnTypeFromStrictScalarReturnsRector (#4297)
  • Skip divide in NumericReturnTypeFromStrictScalarReturnsRector (#4298)
  • [TypeDeclaration] Skip once typed and else return array_map() on ReturnTypeFromStrictTypedCallRector (#4312)
  • Fix command to configure rector (#4314), Thanks @bertramakers!
  • [Performance] [NodeTypeResolver] Reduce callable traverse usage on ContextNodeVisitor (#4317)
  • [CodeQuality] Skip not regex on SimplifyRegexPatternRector (#4322)
  • [TypeDeclaration] Handle crash on object shape on ArrayShapeFromConstantArrayReturnRector (#4323)
  • [Php81] Skip named constructor on ReadOnlyPropertyRector (#4359)
  • Skip argument if value equals default value (#4368), Thanks @stefantalen!
  • [MysqlToMysqli] Handle infinite loop on MysqlQueryMysqlErrorWithLinkRector when no connection instance on first dept stmt (#4375)

Removed 💀

  • Remove removeNode() method from AbstractRector (#4225)
  • Remove Kind from doc mapper, as used just once (#4234)
  • Move LocallyCalledStaticMethodToNonStaticRector to CodeQuality namespace, to avoid dumping removed static set (#4242)
  • Restore RemoveMethodCallParamRector as used (#4244)
  • [Performance] Remove NODES_TO_MATCH constant on RemoveNonExistingVarAnnotationRector (#4267)
  • Remove VarConstantCommentRector as using unreliable docblocks, better use upcoming PHP 8.3 strict type const (#4307)
  • [Naming] Remove BreakingVariableRenameGuard::isUsedInIfAndOtherBranches() to remove previous by types (#4319)
  • [Php81] Remove cast check on NullToStrictStringFuncCallArgRector (#4320)
  • [PhpParser] Remove BetterNodeFinder::findFirstPreviousOfTypes() (#4327)
  • Move AddMethodParentCallRector to Symfony Rector (#4301)

Don't miss a new rector release

NewReleases is sending notifications on new releases.