rectorphp/rector (rector/rector)
### [`v0.17.10`](https://togithub.com/rectorphp/rector/releases/tag/0.17.10): Released Rector 0.17.10
[Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.9...0.17.10)
#### New Features :partying_face:
- \[TypeDeclaration] Add Closure support on NumericReturnTypeFromStrictScalarReturnsRector ([#4631](https://togithub.com/rectorphp/rector-src/pull/4631))
- \[TypeDeclaration] Add Closure support on StrictArrayParamDimFetchRector ([#4632](https://togithub.com/rectorphp/rector-src/pull/4632))
- \[TypeDeclaration] Add Closure support on ReturnTypeFromStrictParamRector ([#4633](https://togithub.com/rectorphp/rector-src/pull/4633))
- \[TypeDeclaration] Add Closure support on StrictStringParamConcatRector ([#4634](https://togithub.com/rectorphp/rector-src/pull/4634))
#### Bugfixes :bug:
- \[Downgrade] \[FIX] Fix infinite loop in DowngradeArrayFilterNullableCallbackRector ([#150](https://togithub.com/rectorphp/rector-downgrade-php/pull/150))
### [`v0.17.9`](https://togithub.com/rectorphp/rector/releases/tag/0.17.9): Released Rector 0.17.9
[Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.8...0.17.9)
#### Bugfixes :bug:
- Fix last arg trailing comma removal DowngradeTrailingCommasInFunctionCallsRector - https://github.com/rectorphp/rector-downgrade-php/commit/059d48366ee50115006a8d26ede574d70da724d2
### [`v0.17.8`](https://togithub.com/rectorphp/rector/releases/tag/0.17.8): Released Rector 0.17.8
[Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.7...0.17.8)
#### New Features :partying_face:
- \[TypeDeclaration] Add Closure support on BoolReturnTypeFromStrictScalarReturnsRector ([#4610](https://togithub.com/rectorphp/rector-src/pull/4610))
- AddMethodCallBasedStrictParamTypeRector: Support changing protected methods in final classes ([#4611](https://togithub.com/rectorphp/rector-src/pull/4611)), Thanks [@staabm](https://togithub.com/staabm)!
- \[TypeDeclaration] Add StrictStringParamConcatRector ([#4624](https://togithub.com/rectorphp/rector-src/pull/4624))
#### Bugfixes :bug:
- \[PHPStanStaticTypeMapper] FQCN for Closure type mapper ([#4584](https://togithub.com/rectorphp/rector-src/pull/4584))
- Fixed constant types handling in TypedPropertyFromStrictConstructorRector ([#4588](https://togithub.com/rectorphp/rector-src/pull/4588)), Thanks [@staabm](https://togithub.com/staabm)!
- \[TypeDeclaration] Skip coalesce on StrictArrayParamDimFetchRector ([#4589](https://togithub.com/rectorphp/rector-src/pull/4589))
- Bump to phpdoc-parser 1.23 and fill construct() attributes ([#4590](https://togithub.com/rectorphp/rector-src/pull/4590))
- \[TypeDeclaration] Skip override string on StrictArrayParamDimFetchRector ([#4591](https://togithub.com/rectorphp/rector-src/pull/4591))
- \[Autoloading] Using SimpleParameterProvider on BootstrapFilesIncluder ([#4592](https://togithub.com/rectorphp/rector-src/pull/4592))
- \[Php81] Fix regression skip call by ref on ReadOnlyPropertyRector ([#4593](https://togithub.com/rectorphp/rector-src/pull/4593))
- \[PHPStanStaticTypeMapper] Make use of toPhpDocNode() on ObjectTypeMapper ([#4581](https://togithub.com/rectorphp/rector-src/pull/4581))
- \[PHPStanStaticTypeMapper] Fix IntersectionTypeMapper to make ObjectType have FQCN ([#4598](https://togithub.com/rectorphp/rector-src/pull/4598))
- \[Php81] Skip re-assign with AssignOp on ReadOnlyPropertyRector ([#4600](https://togithub.com/rectorphp/rector-src/pull/4600))
- Reduce ConstExprClassNameDecorator overhead ([#4603](https://togithub.com/rectorphp/rector-src/pull/4603)), Thanks [@staabm](https://togithub.com/staabm)!
- Resolve native return-type from native union-type in short ternary ([#4606](https://togithub.com/rectorphp/rector-src/pull/4606)), Thanks [@staabm](https://togithub.com/staabm)!
- \[Strict] Skip from docblock [@return](https://togithub.com/return) on DisallowedEmptyRuleFixerRector ([#4608](https://togithub.com/rectorphp/rector-src/pull/4608))
- \[Strict] Skip [@return](https://togithub.com/return) docblock on BooleanInIfConditionRuleFixerRector ([#4609](https://togithub.com/rectorphp/rector-src/pull/4609))
- \[Php81] Fix regression skip call by ref on ReadOnlyPropertyRector on non \__construct method ([#4614](https://togithub.com/rectorphp/rector-src/pull/4614))
- \[CodeQuality]\[Strict] Handle infinite loop on SimplifyDeMorganBinaryRector+SimplifyIfReturnBoolRector+DisallowedEmptyRuleFixerRector ([#4615](https://togithub.com/rectorphp/rector-src/pull/4615))
- \[CodingStyle]\[Namespace\_] Support constant imports ([#4612](https://togithub.com/rectorphp/rector-src/pull/4612)), Thanks [@natepage](https://togithub.com/natepage)!
- \[Php81] Skip property fetch from new static on ReadOnlyPropertyRector ([#4617](https://togithub.com/rectorphp/rector-src/pull/4617))
- \[CodingStyle] Handle crash on empty cases on BinarySwitchToIfElseRector ([#4618](https://togithub.com/rectorphp/rector-src/pull/4618))
- Fix string type on StrictArrayParamDimFetchRector ([#4623](https://togithub.com/rectorphp/rector-src/pull/4623))
- \[PHPStanStaticTypeMapper] Handle crash on DowngradeMixedTypeDeclarationRector for PHPStan\Type\ConditionalType ([#4625](https://togithub.com/rectorphp/rector-src/pull/4625))
- \[Php73] Handle crash Type Error on JsonThrowOnErrorRector ([#4626](https://togithub.com/rectorphp/rector-src/pull/4626))
- \[Php81] Skip call by ref on ReadOnlyPropertyRector on FuncCall ([#4630](https://togithub.com/rectorphp/rector-src/pull/4630))
- \[Printer] Fix printing PHPStan AlwaysRememberedExpr with add unwrapper inside BetterStandardPrinter::p ([#4629](https://togithub.com/rectorphp/rector-src/pull/4629))
- \[TypeDeclaration] Skip has parent class method on AddParamTypeFromPropertyTypeRector ([#4627](https://togithub.com/rectorphp/rector-src/pull/4627))
#### Removed :skull:
- \[Printer] Remove has InlineHTML node check after apply changes on PhpFileProcessor ([#4601](https://togithub.com/rectorphp/rector-src/pull/4601))
### [`v0.17.7`](https://togithub.com/rectorphp/rector/releases/tag/0.17.7): Released Rector 0.17.7
[Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.6...0.17.7)
#### New Features :partying_face:
- \[CodingStyle] Skip filled by construct on AddArrayDefaultToArrayPropertyRector ([#4549](https://togithub.com/rectorphp/rector-src/pull/4549))
- Add constuctor support to ReplaceArgumentDefaultValueRector ([#4554](https://togithub.com/rectorphp/rector-src/pull/4554))
- StaticMapper: added fast path for IdentifierTypeNode ([#4565](https://togithub.com/rectorphp/rector-src/pull/4565)), Thanks [@staabm](https://togithub.com/staabm)!
- Add ReturnTypeFromStrictParamRector ([#4501](https://togithub.com/rectorphp/rector-src/pull/4501)), Thanks [@staabm](https://togithub.com/staabm)!
- Add TypedPropertyFromStrictConstructorReadonlyClassRector ([#4552](https://togithub.com/rectorphp/rector-src/pull/4552)), Thanks [@staabm](https://togithub.com/staabm)!
- ReturnTypeFromStrictTernaryRector: Support complex ternaries ([#4515](https://togithub.com/rectorphp/rector-src/pull/4515)), Thanks [@staabm](https://togithub.com/staabm)!
#### Bugfixes :bug:
- Support final methods in ClassMethodReturnTypeOverrideGuard ([#4509](https://togithub.com/rectorphp/rector-src/pull/4509)), Thanks [@staabm](https://togithub.com/staabm)!
- Support literals in ReturnTypeFromStrictTypedCallRector ([#4511](https://togithub.com/rectorphp/rector-src/pull/4511)), Thanks [@staabm](https://togithub.com/staabm)!
- \[TypeDeclaration] Null stmts check early on ReturnTypeFromStrictParamRector ([#4512](https://togithub.com/rectorphp/rector-src/pull/4512))
- \[Performance] Use filtered filePaths from ApplicationFileProcessor::configurePHPStanNodeScopeResolver on WorkerRunner::run() ([#4513](https://togithub.com/rectorphp/rector-src/pull/4513))
- \[DX] Show progress bar 100% on RectorConsoleOutputFormatter::report() ([#4516](https://togithub.com/rectorphp/rector-src/pull/4516))
- \[ChangesReporting] Reuse defined errors vairable on ConsoleOutputFormatter ([#4517](https://togithub.com/rectorphp/rector-src/pull/4517))
- \[ApplicationFileProcessor] Refactor ApplicationFileProcessor to filter file paths early before run both parallel and non-parallel ([#4519](https://togithub.com/rectorphp/rector-src/pull/4519))
- \[DX] Fix hang on twice run after all files processed cached ([#4521](https://togithub.com/rectorphp/rector-src/pull/4521))
- \[Application] Move filter files by config extensions to FileFactory ([#4522](https://togithub.com/rectorphp/rector-src/pull/4522))
- \[Php81]\[Php82]\[Privatization] Handle extends non-readonly class on ReadOnlyPropertyRector+ReadOnlyClassRector+FinalizeClassesWithoutChildrenRector ([#4524](https://togithub.com/rectorphp/rector-src/pull/4524))
- Fix wrong results in RemoveAlwaysElseRector ([#4527](https://togithub.com/rectorphp/rector-src/pull/4527)), Thanks [@jlherren](https://togithub.com/jlherren)!
- Support class-const-fetch in ReturnTypeFromStrictTypedCallRector ([#4520](https://togithub.com/rectorphp/rector-src/pull/4520)), Thanks [@staabm](https://togithub.com/staabm)!
- \[EarlyReturn] Skip append variable on PreparedValueToEarlyReturnRector ([#4530](https://togithub.com/rectorphp/rector-src/pull/4530))
- Refactor MyCLabs\Enum\Enum::equals calls to comparisons ([#4532](https://togithub.com/rectorphp/rector-src/pull/4532)), Thanks [@rojtjo](https://togithub.com/rojtjo)!
- \[Performance]\[NodeManipulator] Avoid loop on search first variable named on next sliced next stmts on StmtsManipulator ([#4537](https://togithub.com/rectorphp/rector-src/pull/4537))
- \[Performance] \[TypeDeclaration] Reduce resolve ClassReflection on each property on TypedPropertyFromStrictConstructorRector ([#4536](https://togithub.com/rectorphp/rector-src/pull/4536))
- \[Performance]\[TypeDeclaration] Reduce resolve ClassReflection from Property on AllAssignNodePropertyTypeInferer ([#4539](https://togithub.com/rectorphp/rector-src/pull/4539))
- \[Application] Merge process files on both parallel and non-parallel process ([#4523](https://togithub.com/rectorphp/rector-src/pull/4523))
- \[PHPStan] Merge assert phpstan errors to one ([#4544](https://togithub.com/rectorphp/rector-src/pull/4544))
- \[Performance] \[Php74] Reduce ClassReflection lookup from property on PropertyTypeChangeGuard ([#4545](https://togithub.com/rectorphp/rector-src/pull/4545))
- Use instanceof check on ClassReflection resolve ([#4547](https://togithub.com/rectorphp/rector-src/pull/4547))
- \[Reflection] Reduce Scope pulling on ReflectionResolver ([#4548](https://togithub.com/rectorphp/rector-src/pull/4548))
- \[Strict] Skip empty() from param doc on DisallowedEmptyRuleFixerRector ([#4550](https://togithub.com/rectorphp/rector-src/pull/4550))
- Fix space in paths ([#4553](https://togithub.com/rectorphp/rector-src/pull/4553))
- Skip traits in CountOnNullRector ([#4556](https://togithub.com/rectorphp/rector-src/pull/4556))
- Make use of toPhpDocNode() - take [#2](https://togithub.com/rectorphp/rector/issues/2) ([#4555](https://togithub.com/rectorphp/rector-src/pull/4555))
- \[Performance] \[PostRector] Only check phpdocinfo on Stmt and Param on NameImportingPostRector ([#4558](https://togithub.com/rectorphp/rector-src/pull/4558))
- \[CodeQuality] Skip pull property from inner class on CompleteDynamicPropertiesRector ([#4561](https://togithub.com/rectorphp/rector-src/pull/4561))
- Prevent unnecessary scope creation ([#4562](https://togithub.com/rectorphp/rector-src/pull/4562)), Thanks [@staabm](https://togithub.com/staabm)!
- NameImportingPhpDocNodeVisitor: Cheap checks first ([#4563](https://togithub.com/rectorphp/rector-src/pull/4563)), Thanks [@staabm](https://togithub.com/staabm)!
- \[Performance]\[Renaming] No need PhpDocInfo refactor on Name node on ClassRenamer ([#4566](https://togithub.com/rectorphp/rector-src/pull/4566))
- \[TypeDeclaration] Deprecate ArrayShapeFromConstantArrayReturnRector as uses docblocks that we move away from since 0.15 ([#4571](https://togithub.com/rectorphp/rector-src/pull/4571))
- Make ReturnTypeFromStrictNewArrayRector handle only single level arrays ([#4575](https://togithub.com/rectorphp/rector-src/pull/4575))
- Fix array mapping ([#4576](https://togithub.com/rectorphp/rector-src/pull/4576))
- \[Performance] \[PostRector] Reduce repetitive resolve uses statements on NameImportingPostRector ([#4579](https://togithub.com/rectorphp/rector-src/pull/4579))
- \[EarlyReturn] Handle multiple statements in else in ChangeIfElseValueAssignToEarlyReturnRector ([#4580](https://togithub.com/rectorphp/rector-src/pull/4580)), Thanks [@dorrogeray](https://togithub.com/dorrogeray)!
- \[BUGFIX] Ensure proper reprint with attributes for finalized classes ([#4585](https://togithub.com/rectorphp/rector-src/pull/4585)), Thanks [@cngJo](https://togithub.com/cngJo)!
#### Removed :skull:
- \[DX] Remove AllowEmptyConfigurableRectorInterface to ease interface tree, better handle on particular configure() method inside the rule ([#4540](https://togithub.com/rectorphp/rector-src/pull/4540))
- Skip description on same line, remove on next line as based on phpdoc-parser in RemoveUselessParamTagRector ([#4551](https://togithub.com/rectorphp/rector-src/pull/4551))
- \[Performance]\[PostRector] Remove alias exists check on NameImporter called from NameImportingPostRector ([#4564](https://togithub.com/rectorphp/rector-src/pull/4564))
- \[Performance]\[BetterPhpDocParser] Remove unused ConstExprNode check on ConstExprClassNameDecorator ([#4578](https://togithub.com/rectorphp/rector-src/pull/4578))
- \[PHPStanStaticTypeMapper] Remove manual type check on PHPStanStaticTypeMapper ([#4583](https://togithub.com/rectorphp/rector-src/pull/4583))
- \[StaticTypeMapper] Remove standalone false handling on StaticTypeMapper ([#4582](https://togithub.com/rectorphp/rector-src/pull/4582))
### [`v0.17.6`](https://togithub.com/rectorphp/rector/releases/tag/0.17.6): Released Rector 0.17.6
[Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.5...0.17.6)
In this release, we narrowed rules from PHPUit and Doctrine to their specific version category. We've detected few outdated and never used rules and cleaned them up to make Rector smaller and easier to use :+1:
Be use to always use `*SetList` constants over specific rules to use the latest version:
```php
use Rector\Config\RectorConfig;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([
\Rector\PHPUnit\Set\PHPUnitLevelSetList::UP_TO_PHPUNIT_100,
]);
};
```
#### New Features :partying_face:
- Add PHPUnit to sets ([#4495](https://togithub.com/rectorphp/rector-src/pull/4495))
- \[CI] Add PHPUnit 10 to check rules and sets groups ([#4500](https://togithub.com/rectorphp/rector-src/pull/4500))
- \[CI] Add doctrine rules in set check ([#4505](https://togithub.com/rectorphp/rector-src/pull/4505))
#### Bugfixes :bug:
- \[Performance] Only set Attribute on context inside ArrayDimFetch and ArrayItem on specific node used ([#4493](https://togithub.com/rectorphp/rector-src/pull/4493))
- \[Php52] Use instanceof check instead of compare object $newStmt === $caseStmt on ContinueToBreakInSwitchRector ([#4494](https://togithub.com/rectorphp/rector-src/pull/4494))
- Exclude the full docs folder from archives ([#4497](https://togithub.com/rectorphp/rector-src/pull/4497)), Thanks [@stof](https://togithub.com/stof)!
- Cleanup RecastingRemovalRector tests ([#4498](https://togithub.com/rectorphp/rector-src/pull/4498))
- Move Rector order test to PHPUnit, as uses its rules ([#4499](https://togithub.com/rectorphp/rector-src/pull/4499))
- let phpunit handle its own empty method rule ([#4501](https://togithub.com/rectorphp/rector-src/pull/4501)), Thanks [@staabm](https://togithub.com/staabm)!
- Micro optimizations: cheap checks first ([#4510](https://togithub.com/rectorphp/rector-src/pull/4510)), Thanks [@staabm](https://togithub.com/staabm)!
- Skip coalsce assign in RemoveUnusedPrivatePropertyRector ([#4491](https://togithub.com/rectorphp/rector-src/pull/4491))
- \[DeadCode] Skip append += assignment on RemoveUnusedPrivatePropertyRector ([#4506](https://togithub.com/rectorphp/rector-src/pull/4506))
- \[AstResolver]\[Performance] Remove unnecessary double File read on AstResolver::parseFileNameToDecoratedNodes() ([#4508](https://togithub.com/rectorphp/rector-src/pull/4508))
#### Removed :skull:
- \[NodeTypeResolver] Remove unused AttributeKey::INSIDE_ARRAY_ITEM on ContextNodeVisitor ([#4496](https://togithub.com/rectorphp/rector-src/pull/4496))
- \[NodeTypeResolver] Remove AttributeKey::IS_RETURN_EXPR from ContextNodeVisitor ([#4502](https://togithub.com/rectorphp/rector-src/pull/4502))
- \[NodeTypeResolver] Remove AttributeKey::IS_ISSET_VAR from ContextNodeVisitor ([#4503](https://togithub.com/rectorphp/rector-src/pull/4503))
- \[NodeTypeResolver] Remove nestedChainMethodCallLimit() for deep method call counter check ([#4504](https://togithub.com/rectorphp/rector-src/pull/4504))
### [`v0.17.5`](https://togithub.com/rectorphp/rector/releases/tag/0.17.5): Released Rector 0.17.5
[Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.4...0.17.5)
#### Removed :skull:
- \[DeadCode] Skip property not exists on RemoveTypedPropertyDeadInstanceOfRector ([#4481](https://togithub.com/rectorphp/rector-src/pull/4481))
- \[CodeQuality]\[Php80] Handle infite loop swap params on RemoveUnusedVariableInCatchRector + OptionalParametersAfterRequiredRector ([#4484](https://togithub.com/rectorphp/rector-src/pull/4484))
#### Bugfixes :bug:
- fix(rules): Skip readonly classes from restoring default null value. ([#4479](https://togithub.com/rectorphp/rector-src/pull/4479)), Thanks [@scyzoryck](https://togithub.com/scyzoryck)!
- \[Php80] Handle crash on ClassOnObjectRector + GetDebugTypeRector ([#4483](https://togithub.com/rectorphp/rector-src/pull/4483))
- \[Strict] Fix DisallowedEmptyRuleFixerRector on empty string isset ([#4485](https://togithub.com/rectorphp/rector-src/pull/4485))
- Fix StrictArrayParamDimFetchRector on `is_*` calls ([#4486](https://togithub.com/rectorphp/rector-src/pull/4486)), Thanks [@staabm](https://togithub.com/staabm)!
- Fix trait rename in Php4ConsturctorRector ([#4487](https://togithub.com/rectorphp/rector-src/pull/4487))
- Fix StrictArrayParamDimFetchRector on same named property ([#4488](https://togithub.com/rectorphp/rector-src/pull/4488)), Thanks [@staabm](https://togithub.com/staabm)!
### [`v0.17.4`](https://togithub.com/rectorphp/rector/releases/tag/0.17.4): Released Rector 0.17.4
[Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.3...0.17.4)
#### Bugfixes :bug:
- \[CodeQuality]\[EarlyReturn] Handle crash Replace Stmt to Expr on FlipTypeControlToUseExclusiveTypeRector+FlipTypeControlToUseExclusiveTypeRector+ReturnBinaryOrToEarlyReturnRector ([#4474](https://togithub.com/rectorphp/rector-src/pull/4474))
- Fix ReturnBinaryOrToEarlyReturnRector mixing up returned nodes of array, hook into StmtsAwareInterface instead to keep next Rector rules updated ([#4476](https://togithub.com/rectorphp/rector-src/pull/4476))
#### Removed :skull:
- Remove duplicated version_compare ReplaceFuncCallArgumentDefaultValue rule ([#4473](https://togithub.com/rectorphp/rector-src/pull/4473)), Thanks [@alexander-schranz](https://togithub.com/alexander-schranz)!
- \[EarlyReturn] Remove ReturnBinaryAndToEarlyReturnRector as creates code hard to read and flips condition ([#4478](https://togithub.com/rectorphp/rector-src/pull/4478))
### [`v0.17.3`](https://togithub.com/rectorphp/rector/releases/tag/0.17.3): Released Rector 0.17.3
[Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.2...0.17.3)
In this release we continue preparing for Rector 1.0 release [https://github.com/rectorphp/rector/issues/7854](https://togithub.com/rectorphp/rector/issues/7854)
This includes **removing last parent node** connections, to lower node tree memory consumption 🥳️🥳️🥳️
- \[EarlyReturn] Remove findFirstNext() on InvertedIfFactory ([#4399](https://togithub.com/rectorphp/rector-src/pull/4399))
- \[DX] Remove findParentType() method ([#4438](https://togithub.com/rectorphp/rector-src/pull/4438))
- \[DX] Remove parent node from AbstractRector ([#4465](https://togithub.com/rectorphp/rector-src/pull/4465))
#### New Features :partying_face:
- Add float mul integer type to NumericReturnTypeFromStrictScalarReturnsRector ([#4376](https://togithub.com/rectorphp/rector-src/pull/4376))
- \[TypeDeclaration] Add Encapsed string support to AlwaysStrictScalarExprAnalyzer ([#4382](https://togithub.com/rectorphp/rector-src/pull/4382))
- \[TypeDeclaration] Add StrictArrayParamDimFetchRector ([#4384](https://togithub.com/rectorphp/rector-src/pull/4384))
- \[DX] Kick of SimpleParameterProvider ([#4405](https://togithub.com/rectorphp/rector-src/pull/4405))
#### Bugfixes :bug:
- \[DeadCode] Skip non typed param numeric check on RecastingRemovalRector ([#4390](https://togithub.com/rectorphp/rector-src/pull/4390))
- \[Renaming] Handle crash on catch Exception name on RenameClassRector ([#4401](https://togithub.com/rectorphp/rector-src/pull/4401))
- Fix NumericReturnTypeFromStrictScalarReturnsRector for non-natively-typed parameters ([#4380](https://togithub.com/rectorphp/rector-src/pull/4380)), Thanks [@staabm](https://togithub.com/staabm)!
- \[Php82] Skip extends unknown class on ReadonlyClassRector ([#4408](https://togithub.com/rectorphp/rector-src/pull/4408))
- \[TypeDeclaration] Handle crash on no namespace with + operation on DeclareStrictTypesRector ([#4414](https://togithub.com/rectorphp/rector-src/pull/4414))
- \[NodeTypeResolver] Reduce duplicated Scope fill on FuncCall ([#4428](https://togithub.com/rectorphp/rector-src/pull/4428))
- Make JsonThrowOnErrorRector work with local scope to detect error_json methods ([#4451](https://togithub.com/rectorphp/rector-src/pull/4451))
- Deprecate resolveNextNode() to work only in current node tree context ([#4455](https://togithub.com/rectorphp/rector-src/pull/4455))
- \[Naming] Skip used on next foreach on RenameForeachValueVariableToMatchExprVariableRector ([#4469](https://togithub.com/rectorphp/rector-src/pull/4469))
#### Removed :skull:
- Remove duplicate ReturnNeverTypeRector rule ([#4381](https://togithub.com/rectorphp/rector-src/pull/4381)), Thanks [@buffcode](https://togithub.com/buffcode)!
- \[MysqlToMysqli] Deprecate set, as dangerous to use, better handle manually ([#4448](https://togithub.com/rectorphp/rector-src/pull/4448))
- \[DX] Make use of SimpleParameterProvider directly, deprecate RectorConfigProvider ([#4460](https://togithub.com/rectorphp/rector-src/pull/4460))
- \[Performance] Immediate remove UnreachableStatementNodeVisitor object after traverse to avoid re-use in next file ([#4417](https://togithub.com/rectorphp/rector-src/pull/4417))
- \[NodeTypeResolver] Remove ArrayItem scope filling from Array\_ and Name filling for Catch types on PHPStanNodeScopeResolver ([#4423](https://togithub.com/rectorphp/rector-src/pull/4423))
- \[PHP 8] Resources object upgrade - remove 2 rules as the upgrade require wholesome manual work ([#4442](https://togithub.com/rectorphp/rector-src/pull/4442))
- \[DeadCode] Remove RemoveJustVariableAssignRector as often done on purpose or with side effect ([#4450](https://togithub.com/rectorphp/rector-src/pull/4450))
- Remove deprecated resolveNextNode() to embrace local scope node ([#4456](https://togithub.com/rectorphp/rector-src/pull/4456))
- \[DX] Remove node connecting traverser from AbstractRector ([#4463](https://togithub.com/rectorphp/rector-src/pull/4463))
- Remove NodeConnectingTraverser ([#4464](https://togithub.com/rectorphp/rector-src/pull/4464))
- \[DX] Remove autowrapping of expr/stmt to make return values in the same type and reliable ([#4466](https://togithub.com/rectorphp/rector-src/pull/4466))
### [`v0.17.2`](https://togithub.com/rectorphp/rector/releases/tag/0.17.2): Released Rector 0.17.2
[Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.1...0.17.2)
In this release we continue preparing for Rector 1.0 release [https://github.com/rectorphp/rector/issues/7854](https://togithub.com/rectorphp/rector/issues/7854)
This includes:
- removing more parent node connections, to lower node tree memory consumption
#### New Features :partying_face:
- Add sleep after processPool->quitAll() to give time for all child processes to terminate ([#4280](https://togithub.com/rectorphp/rector-src/pull/4280)), Thanks [@dorrogeray](https://togithub.com/dorrogeray)!
- \[TypeDeclaration] Add NumericReturnTypeFromStrictScalarReturnsRector ([#4296](https://togithub.com/rectorphp/rector-src/pull/4296))
- \[Php71] Add Closure support on AssignArrayToStringRector ([#4303](https://togithub.com/rectorphp/rector-src/pull/4303))
- Introduces `AddSensitiveParameterAttributeRector` rule ([#4342](https://togithub.com/rectorphp/rector-src/pull/4342)), Thanks [@peterfox](https://togithub.com/peterfox)!
- Bump nikic/php-parser to 4.16.0 ([#4343](https://togithub.com/rectorphp/rector-src/pull/4343))
- Show error when no files will be processed ([#4326](https://togithub.com/rectorphp/rector-src/pull/4326)), Thanks [@staabm](https://togithub.com/staabm)!
- Cache unchanged files on dry run v2 ([#4281](https://togithub.com/rectorphp/rector-src/pull/4281)), Thanks [@dorrogeray](https://togithub.com/dorrogeray)!
#### Bugfixes :bug:
- \[CodeQuality] Handle crash on variable variable on OptionalParametersAfterRequiredRector ([#4226](https://togithub.com/rectorphp/rector-src/pull/4226))
- Fix LocallyCalledStaticMethodToNonStaticRector with method args ([#4233](https://togithub.com/rectorphp/rector-src/pull/4233)), Thanks [@toastedghost](https://togithub.com/toastedghost)!
- Use `FunctionLike` contract instead of union of function-like concrete implementations ([#4241](https://togithub.com/rectorphp/rector-src/pull/4241)), Thanks [@Wirone](https://togithub.com/Wirone)!
- \[CodeQuality]\[Performance] Reduce repetitive NodeTypeResolver->getType() on ExprBoolCaster ([#4279](https://togithub.com/rectorphp/rector-src/pull/4279))
- Skip rewindable generator ([#4282](https://togithub.com/rectorphp/rector-src/pull/4282))
- \[Php55]\[NodeTypeResolver] Handle crash on dynamic variable concat assign on StringClassNameToClassConstantRector ([#4283](https://togithub.com/rectorphp/rector-src/pull/4283))
- \[Php55] Clean up FullyQualified assigned to FullyQualified on StringClassNameToClassConstantRector ([#4284](https://togithub.com/rectorphp/rector-src/pull/4284))
- \[TypeDeclaration] Extend NumericReturnTypeFromStrictScalarReturnsRector ([#4297](https://togithub.com/rectorphp/rector-src/pull/4297))
- Skip divide in NumericReturnTypeFromStrictScalarReturnsRector ([#4298](https://togithub.com/rectorphp/rector-src/pull/4298))
- \[TypeDeclaration] Skip once typed and else return array_map() on ReturnTypeFromStrictTypedCallRector ([#4312](https://togithub.com/rectorphp/rector-src/pull/4312))
- Fix command to configure rector ([#4314](https://togithub.com/rectorphp/rector-src/pull/4314)), Thanks [@bertramakers](https://togithub.com/bertramakers)!
- \[Performance] \[NodeTypeResolver] Reduce callable traverse usage on ContextNodeVisitor ([#4317](https://togithub.com/rectorphp/rector-src/pull/4317))
- \[CodeQuality] Skip not regex on SimplifyRegexPatternRector ([#4322](https://togithub.com/rectorphp/rector-src/pull/4322))
- \[TypeDeclaration] Handle crash on object shape on ArrayShapeFromConstantArrayReturnRector ([#4323](https://togithub.com/rectorphp/rector-src/pull/4323))
- \[Php81] Skip named constructor on ReadOnlyPropertyRector ([#4359](https://togithub.com/rectorphp/rector-src/pull/4359))
- Skip argument if value equals default value ([#4368](https://togithub.com/rectorphp/rector-src/pull/4368)), Thanks [@stefantalen](https://togithub.com/stefantalen)!
- \[MysqlToMysqli] Handle infinite loop on MysqlQueryMysqlErrorWithLinkRector when no connection instance on first dept stmt ([#4375](https://togithub.com/rectorphp/rector-src/pull/4375))
#### Removed :skull:
- Remove `removeNode()` method from AbstractRector ([#4225](https://togithub.com/rectorphp/rector-src/pull/4225))
- Remove Kind from doc mapper, as used just once ([#4234](https://togithub.com/rectorphp/rector-src/pull/4234))
- Move LocallyCalledStaticMethodToNonStaticRector to CodeQuality namespace, to avoid dumping removed static set ([#4242](https://togithub.com/rectorphp/rector-src/pull/4242))
- Restore RemoveMethodCallParamRector as used ([#4244](https://togithub.com/rectorphp/rector-src/pull/4244))
- \[Performance] Remove NODES_TO_MATCH constant on RemoveNonExistingVarAnnotationRector ([#4267](https://togithub.com/rectorphp/rector-src/pull/4267))
- Remove VarConstantCommentRector as using unreliable docblocks, better use upcoming PHP 8.3 strict type const ([#4307](https://togithub.com/rectorphp/rector-src/pull/4307))
- \[Naming] Remove BreakingVariableRenameGuard::isUsedInIfAndOtherBranches() to remove previous by types ([#4319](https://togithub.com/rectorphp/rector-src/pull/4319))
- \[Php81] Remove cast check on NullToStrictStringFuncCallArgRector ([#4320](https://togithub.com/rectorphp/rector-src/pull/4320))
- \[PhpParser] Remove BetterNodeFinder::findFirstPreviousOfTypes() ([#4327](https://togithub.com/rectorphp/rector-src/pull/4327))
- Move AddMethodParentCallRector to Symfony Rector ([#4301](https://togithub.com/rectorphp/rector-src/pull/4301))
### [`v0.17.1`](https://togithub.com/rectorphp/rector/releases/tag/0.17.1): Released Rector 0.17.1
[Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.0...0.17.1)
In this release we continue preparing for Rector 1.0 release [https://github.com/rectorphp/rector/issues/7854](https://togithub.com/rectorphp/rector/issues/7854)
This includes:
- removing more parent node connections, to lower node tree memory consumption
- replacing `removeNode()` method with `return NodeTraverser::REMOVE_NODE` direct constant to make changes happen directly in the Rector rule
- refactoring node adding from post-process to directly in the rule
#### New Features :partying_face:
- \[Docblock] Move DocBlockUpdater service usage from AbstractRector to PhpDocTypeChanger ([#4215](https://togithub.com/rectorphp/rector-src/pull/4215))
- Improve string support in Doctrine Annotations ([#3645](https://togithub.com/rectorphp/rector-src/pull/3645)), Thanks [@yguedidi](https://togithub.com/yguedidi)!
- \[Php80] Fix add default nullable type on ClassPropertyAssignToConstructorPromotionRector ([#4091](https://togithub.com/rectorphp/rector-src/pull/4091))
- Add STRICT_BOOLEANS set ([#4116](https://togithub.com/rectorphp/rector-src/pull/4116))
#### Changes
- \[FileProcessor] Add warning instead of skip InlineHTML on PhpFileProcessor ([#4058](https://togithub.com/rectorphp/rector-src/pull/4058))
- Remove node adding collector ([#4095](https://togithub.com/rectorphp/rector-src/pull/4095))
- Remove propperty to add collector, add them directly or as a constructor dependency ([#4131](https://togithub.com/rectorphp/rector-src/pull/4131))
- Move ReturnArrayClassMethodToYieldRector to PHPUnit Rector ([#4213](https://togithub.com/rectorphp/rector-src/pull/4213))
#### Bugfixes :bug:
- \[CodeQuality] Exclude first class callable from IntvalToTypeCastRector ([#7962](https://togithub.com/rectorphp/rector/issues/7962)) ([#4040](https://togithub.com/rectorphp/rector-src/pull/4040)), Thanks [@thbley](https://togithub.com/thbley)!
- \[CodingStyle] Skip first class callable on UnSpreadOperatorRector ([#4041](https://togithub.com/rectorphp/rector-src/pull/4041))
- Skip StrvalToType for strval first class callable syntax ([#4046](https://togithub.com/rectorphp/rector-src/pull/4046)), Thanks [@NicoImparfait](https://togithub.com/NicoImparfait)!
- Ensure check isFirstClassCallable() before node->getArgs() on CallLike ([#4049](https://togithub.com/rectorphp/rector-src/pull/4049))
- \[CodeQuality] Skip multiple assigns append before foreach on ForeachItemsAssignToEmptyArrayToAssignRector ([#4052](https://togithub.com/rectorphp/rector-src/pull/4052))
- \[CodeQuality] Skip deep append in if foreach before on ForeachItemsAssignToEmptyArrayToAssignRector ([#4053](https://togithub.com/rectorphp/rector-src/pull/4053))
- \[NodeTypeResolver] Handle crash after next exit() on no namespaced code after removal next attribute ([#4074](https://togithub.com/rectorphp/rector-src/pull/4074))
- \[FileProcessor] Show warning on has InlineHTML node if file has changed on PhpFileProcessor ([#4079](https://togithub.com/rectorphp/rector-src/pull/4079))
- Make SimplifyRegexPatternRector work without parent nodes + deprecate BetterNodeFinder and findParent\* methods ([#4105](https://togithub.com/rectorphp/rector-src/pull/4105))
- Fix StaticCallOnNonStaticToInstanceCallRector to skip parent's parent's method calls. ([#4098](https://togithub.com/rectorphp/rector-src/pull/4098)), Thanks [@klimslim](https://togithub.com/klimslim)!
- \[CodingStyle] Skip countable object on CountArrayToEmptyArrayComparisonRector ([#4108](https://togithub.com/rectorphp/rector-src/pull/4108))
- \[DeadCode] Skip used on Closure use next stmt on RemoveUnusedVariableAssignRector ([#4042](https://togithub.com/rectorphp/rector-src/pull/4042))
- \[CodeQuality] Handle throw after if on ConsecutiveNullCompareReturnsToNullCoalesceQueueRector ([#4107](https://togithub.com/rectorphp/rector-src/pull/4107))
- \[CodeQuality] Handle return new object and no return on ConsecutiveNullCompareReturnsToNullCoalesceQueueRector ([#4112](https://togithub.com/rectorphp/rector-src/pull/4112))
- Make ConvertStaticPrivateConstantToSelfRector work for non-final classes, make part of code-quality set ([#4114](https://togithub.com/rectorphp/rector-src/pull/4114))
- StringClassNameToClassConstantRector: cheap checks first ([#4151](https://togithub.com/rectorphp/rector-src/pull/4151)), Thanks [@staabm](https://togithub.com/staabm)!
- Reduce memory-consumption by simpler skip-patterns ([#4152](https://togithub.com/rectorphp/rector-src/pull/4152)), Thanks [@staabm](https://togithub.com/staabm)!
- Skipping: Use plain string functions instead of regex matching ([#4153](https://togithub.com/rectorphp/rector-src/pull/4153)), Thanks [@staabm](https://togithub.com/staabm)!
- Split instance of check to 2 rules ([#4165](https://togithub.com/rectorphp/rector-src/pull/4165))
- Performance: Prevent sorting of files in PhpFilesFinder ([#4164](https://togithub.com/rectorphp/rector-src/pull/4164)), Thanks [@staabm](https://togithub.com/staabm)!
- Move PreferThisOrSelfMethodCallRector to PHPUnit rector package, to handle exact cases ([#4194](https://togithub.com/rectorphp/rector-src/pull/4194))
- \[Renaming] Handle crash in trait use on RenameClassRector ([#4196](https://togithub.com/rectorphp/rector-src/pull/4196))
- \[Php56] Handle infinite loop on big array method call on AddDefaultValueForUndefinedVariableRector ([#4142](https://togithub.com/rectorphp/rector-src/pull/4142))
- \[Php56] Skip variable variable on AddDefaultValueForUndefinedVariableRector ([#4148](https://togithub.com/rectorphp/rector-src/pull/4148))
#### Removed :skull:
- \[DeadCode] Remove removeNode() from RemoveDeadReturnRector, merge RemoveLastReturnRector to RemoveDeadReturnRector ([#4085](https://togithub.com/rectorphp/rector-src/pull/4085))
- \[PHP+HTML cleanup] Remove MixPhpHtmlDecorator ([#4054](https://togithub.com/rectorphp/rector-src/pull/4054))
- Remove HTML + PHP support, as must be handled in php-parser first ([#4051](https://togithub.com/rectorphp/rector-src/pull/4051))
- Remove MultipleClassFileToPsr4ClassesRector as only PSR4 rule, bit risky and better handled with PHPStan + remove adding/removing files logic, use printer instead ([#4117](https://togithub.com/rectorphp/rector-src/pull/4117))
- Remove NormalizeNamespaceByPSR4ComposerAutoloadRector as only moves files to namespaces, does not update any class referenes; better use IDE here ([#4057](https://togithub.com/rectorphp/rector-src/pull/4057))
- Remove MultipleClassFileToPsr4ClassesRector as only PSR4 rule, bit risky and better handled with PHPStan + remove adding/removing files logic, use printer instead ([#4117](https://togithub.com/rectorphp/rector-src/pull/4117))
- Remove AttributeCompatibleAnnotationRector, as only for one-time migration of private project, not suitable for general use ([#4064](https://togithub.com/rectorphp/rector-src/pull/4064))
- Remove RemoveAlwaysTrueConditionSetInConstructor, as overly specific and not practical; better handle with PHPStan ([#4065](https://togithub.com/rectorphp/rector-src/pull/4065))
- Remove deprecated UnionTypesRector and NarrowUnionTypeDocRector, use strict-based rules from TypeDeclaration set instead ([#4069](https://togithub.com/rectorphp/rector-src/pull/4069))
- Remove TargetRemoveClassMethodRector, as IDE specific ([#4076](https://togithub.com/rectorphp/rector-src/pull/4076))
- Remove ArrayKeysAndInArrayToArrayKeyExistsRector as narrow, does not check variable usage and might be on purpose ([#4084](https://togithub.com/rectorphp/rector-src/pull/4084))
- Remove ChangeGlobalVariablesToPropertiesRector as the scope might change after the variable is defined, better handle with PHPStan ([#4086](https://togithub.com/rectorphp/rector-src/pull/4086))
- Remove NewToConstructorInjectionRector as unused and only for demo purposes ([#4087](https://togithub.com/rectorphp/rector-src/pull/4087))
- \[NodeTraverser] Remove double apply FileWithoutNamespace, remove recursive lookup stmts on BetterStandardPrinter ([#4097](https://togithub.com/rectorphp/rector-src/pull/4097))
- Remove ActionInjectionToConstructorInjectionRector as rather for demo purposes, not practical ([#4113](https://togithub.com/rectorphp/rector-src/pull/4113))
- Remove ConstantListClassToEnumRector as custom-made, not practical for enum upgrades ([#4115](https://togithub.com/rectorphp/rector-src/pull/4115))
- Remove RemoveMethodCallParamRector, as unused ([#4119](https://togithub.com/rectorphp/rector-src/pull/4119))
- Remove RemoveAllowDynamicPropertiesAttributeRector as attribute is a comment on lower PHP versions, also rather downgrade rule ([#4120](https://togithub.com/rectorphp/rector-src/pull/4120))
- Remove DoctrineAnnotationClassToAttributeRector as made for custom project, not useful for general use ([#4127](https://togithub.com/rectorphp/rector-src/pull/4127))
- Remove UnsetAndIssetToMethodCallRector as unused ([#4123](https://togithub.com/rectorphp/rector-src/pull/4123))
- Remove MethodCallToMethodCallRector as unused ([#4128](https://togithub.com/rectorphp/rector-src/pull/4128))
- Remove NewArgToMethodCallRector as unused ([#4130](https://togithub.com/rectorphp/rector-src/pull/4130))
- Remove RemoveDelegatingParentCallRector as overly complex and usually on purpose ([#4136](https://togithub.com/rectorphp/rector-src/pull/4136))
- Remove RemoveEmptyMethodCallRector as better handled by PHPStan ([#4161](https://togithub.com/rectorphp/rector-src/pull/4161))
- Remove BetterNodeFinder::findLastInstanceOf() as unused + make resolvePreviousNode() private, as used only locally ([#4195](https://togithub.com/rectorphp/rector-src/pull/4195))
- \[DeadCode] Remove Assign and AssignRef as node types on RemoveNonExistingVarAnnotationRector ([#4209](https://togithub.com/rectorphp/rector-src/pull/4209))
### [`v0.17.0`](https://togithub.com/rectorphp/rector/releases/tag/0.17.0): Released Rector 0.17
[Compare Source](https://togithub.com/rectorphp/rector/compare/0.16.0...0.17.0)
#### Preparing for Rector 1.0
In this release, we focus on architecture improvements before reaching Rector 1.0. We want to lower the memory usage and make Rector run faster.
**This include removing next/previous nodes** - this will most likely not affect you, as Rector rules were upgraded, but if you do you use them, switch to `StmtsAwareInterface` instead
We follow PHPStan 1.6 move from April 2022, where you can **learn more**: https://phpstan.org/blog/preprocessing-ast-for-custom-rules
- Replace NodeConnectingVisitor with ParentConnectingVisitor ([#3900](https://togithub.com/rectorphp/rector-src/pull/3900))
To see how to refactor to `StmtsAwareInterface`, check these PRs:
- Remove NEXT_NODE dependency in ChangeAndIfToEarlyReturnRector, narrow to only closed scope function likes ([#3913](https://togithub.com/rectorphp/rector-src/pull/3913))
- Remove NEXT_NODE from SimplifyIfReturnBoolRector ([#3915](https://togithub.com/rectorphp/rector-src/pull/3915))
- \[DeadCode] Remove next attribute on RemoveUnusedVariableAssignRector (\[[#3917](https://togithub.com/rectorphp/rector/issues/3917)]\(https://github.com/rectorphp/
- \[CodingStyle] Refactor CatchExceptionNameMatchingTypeRector to use StmtsAwareInterface ([#3788](https://togithub.com/rectorphp/rector-src/pull/3788))
#### Add/remove nodes directly 👍
The next improvement focuses on explicit node adding/removal. Thanks to `StmtsAwareInterface` we can add nodes directly. This makes Rector `refactor()` method contain all the code you need.
- Cleanup usage of NodesToAddCollector, return nodes directly instead ([#4003](https://togithub.com/rectorphp/rector-src/pull/4003))
- Cleanup removeNodeFromStatements(), removeArg(), removeParam(), removeStmt() methods and remove nodes directly ([#4012](https://togithub.com/rectorphp/rector-src/pull/4012))
- Remove unused addNodeAfterNode(), return nodes instead ([#4023](https://togithub.com/rectorphp/rector-src/pull/4023))
- Remove unused method addNodesBeforeNode() ([#4024](https://togithub.com/rectorphp/rector-src/pull/4024))
#### New Features :partying_face:
- \[PHP 7.0] Add `IfIssetToCoalescingRector` ([#3878](https://togithub.com/rectorphp/rector-src/pull/3878))
- Support attributes in `RemoveFinalFromEntityRector` ([#3727](https://togithub.com/rectorphp/rector-src/pull/3727)), Thanks [@alexndlm](https://togithub.com/alexndlm)!
- Add `SwapMethodCallArgumentsRector` ([#3726](https://togithub.com/rectorphp/rector-src/pull/3726)), Thanks [@gaydamakha](https://togithub.com/gaydamakha)!
- \[CodeQuality] Add `CleanupUnneededNullsafeOperatorRector` ([#3767](https://togithub.com/rectorphp/rector-src/pull/3767))
- Make `ReturnNeverTypeRector` work with type declaration, add it to PHP 8.1 set ([#3852](https://togithub.com/rectorphp/rector-src/pull/3852))
- \[TypeDeclaration] Add `BoolReturnTypeFromStrictScalarReturnsRector` ([#3898](https://togithub.com/rectorphp/rector-src/pull/3898))
- Make ChangeGlobalVariablesToPropertiesRector add properties directly, remove Nette inject methods ([#3957](https://togithub.com/rectorphp/rector-src/pull/3957))
- Utilize MinPhpVersionInterface in more rules ([#3752](https://togithub.com/rectorphp/rector-src/pull/3752)), Thanks [@staabm](https://togithub.com/staabm)!
- Dump dependency container and re-use it - 35% faster test-suite ([#3809](https://togithub.com/rectorphp/rector-src/pull/3809)), Thanks [@staabm](https://togithub.com/staabm)!
- Defer type-resolving in RemoveJustPropertyFetchRector ([#3761](https://togithub.com/rectorphp/rector-src/pull/3761)), Thanks [@staabm](https://togithub.com/staabm)!
#### Bugfixes :bug:
- \[TypeDeclaration] Skip Arg unpack on AddMethodCallBasedStrictParamTypeRector ([#3787](https://togithub.com/rectorphp/rector-src/pull/3787))
- \[CodeQuality] Add typed property support to `IssetOnPropertyObjectToPropertyExistsRector` ([#3876](https://togithub.com/rectorphp/rector-src/pull/3876))
- \[CodeQuality] Skip non-array type on SimplifyForeachToArrayFilterRector ([#3738](https://togithub.com/rectorphp/rector-src/pull/3738))
- Fix ShortenedObjectType not resolving to correct class reflection ([#3397](https://togithub.com/rectorphp/rector-src/pull/3397)), Thanks [@jackbentley](https://togithub.com/jackbentley)!
- Extend code-quality set ([#3773](https://togithub.com/rectorphp/rector-src/pull/3773))
- Don't neon-decode phpstan configs over and over again ([#3796](https://togithub.com/rectorphp/rector-src/pull/3796)), Thanks [@staabm](https://togithub.com/staabm)!
- \[Console] Allow https url instead of git:// on SetupCICommand ([#3799](https://togithub.com/rectorphp/rector-src/pull/3799))
- Fix integer range phpdoc types being treated as useless ([#3825](https://togithub.com/rectorphp/rector-src/pull/3825)), Thanks [@jlherren](https://togithub.com/jlherren)!
- Fix nullable param in ClassPropertyAssignToConstructorPromotionRector ([#3842](https://togithub.com/rectorphp/rector-src/pull/3842))
- Fix PrivatesAccessor: use selectFromArgs() instead ([#3923](https://togithub.com/rectorphp/rector-src/pull/3923)), Thanks [@staabm](https://togithub.com/staabm)!
#### Removed rules :skull:
We've also remove bunch of rules, that were added in early days of Rector for demo purposes. They were not used as of any set for non-reliable cases. PHPStan and coding standards replace some of those.
- \[CodeQuality] Remove ForToForeachRector, as overly deatiled and not reliable ([#3747](https://togithub.com/rectorphp/rector-src/pull/3747))
- \[CodeQuality] Remove SimplifyIfExactValueReturnValueRector, as overly defensive + InlineSimplePropertyAnnotationRector as purely coding standard area ([#3764](https://togithub.com/rectorphp/rector-src/pull/3764))
- \[CodingStyle] Remove RemoveDoubleUnderscoreInMethodNameRector, as naming is not handled for breaking reasons ([#3765](https://togithub.com/rectorphp/rector-src/pull/3765))
- Remove RemoveUnusedVariableAssignRector, as could be breaking code in order of excution and hard to do reliable ([#3793](https://togithub.com/rectorphp/rector-src/pull/3793))
- \[CodingStyle] Remove ConsistentPregDelimiterRector as not much practical, importance of regex is a testing it matches expectationg, area of static analysis ([#3797](https://togithub.com/rectorphp/rector-src/pull/3797))
- Remove ToStringToMethodCallRector as not practical and only for demo, FalseReturnClassMethodToNullableRector, as requires detailed custom refactoring ([#3854](https://togithub.com/rectorphp/rector-src/pull/3854))
- Remove ChangeOrIfReturnToEarlyReturnRector as makes code harder to read by duplication, rather use PHSPtan and extract method ([#3916](https://togithub.com/rectorphp/rector-src/pull/3916))
- \[DeadCode] Remove RemoveDuplicatedIfReturnRector as can lead to unexpeced consequences, better use static analysis and contextual handling ([#3926](https://togithub.com/rectorphp/rector-src/pull/3926))
- \[DeadCode] Remove RemoveDuplicatedInstanceOfRector as hardly practical ([#3936](https://togithub.com/rectorphp/rector-src/pull/3936))
- \[CodeQuality] Remove ExplicitMethodCallOverMagicGetSetRector designed for nette smart object migration only, not useful for general projects ([#3948](https://togithub.com/rectorphp/rector-src/pull/3948))
- Remove GetAndSetToMethodCallRector, as not practical and used for single legacy job ([#3953](https://togithub.com/rectorphp/rector-src/pull/3953))
- Remove ChangeReadOnlyVariableWithDefaultValueToConstantRector overly complex and risky, better job for PHPStan ([#3954](https://togithub.com/rectorphp/rector-src/pull/3954))
- Remove IsObjectOnIncompleteClassRector as blindly turns all incomplete checks to negated, better examine manually ([#3969](https://togithub.com/rectorphp/rector-src/pull/3969))
- Remove ReservedObjectRector as requires explicit configuration and is handled by RenameClassRector already ([#3975](https://togithub.com/rectorphp/rector-src/pull/3975))
- Remove ChangeReadOnlyPropertyWithDefaultValueToConstantRector as overly detailed checks, better use PHPStan and refactor individually ([#4028](https://togithub.com/rectorphp/rector-src/pull/4028))
- Remove NewToMethodCallRector as unused core and no other extension, niche to use, better handle by PHPStorm ([#4029](https://togithub.com/rectorphp/rector-src/pull/4029))
- \[CodingStyle] Remove AddFalseDefaultToBoolPropertyRector, as works with unrelaible docblocks ([#3856](https://togithub.com/rectorphp/rector-src/pull/3856))
- Remove UpdateFileNameByClassNameFileSystemRector niche rule that was added just for example sake ([#3849](https://togithub.com/rectorphp/rector-src/pull/3849))
- \[Transform] Remove ArgumentFuncCallToMethodCallRector as never used ([#3774](https://togithub.com/rectorphp/rector-src/pull/3774))
- \[Transform] Remove DimFetchAssignToMethodCallRector as unused ([#3775](https://togithub.com/rectorphp/rector-src/pull/3775))
- \[Transform] Remove FileGetContentsAndJsonDecodeToStaticCallRector as only for demo purposes ([#3776](https://togithub.com/rectorphp/rector-src/pull/3776))
- \[Transform] Remove MethodCallToAnotherMethodCallWithArgumentsRector as unused ([#3777](https://togithub.com/rectorphp/rector-src/pull/3777))
- \[CodeQuality] Remove SimplifyUselessLastVariableAssignRector as overly complex and should be handled individually ([#3784](https://togithub.com/rectorphp/rector-src/pull/3784))
- Remove AddPregQuoteDelimiterRector as very narrow area and has not context awareness, better handle manually ([#3927](https://togithub.com/rectorphp/rector-src/pull/3927))
- Remove TokenGetAllToObjectRector, as rare to use and leaky to handle, better handle in controller manual way ([#4001](https://togithub.com/rectorphp/rector-src/pull/4001))
- Remove ChangeReflectionTypeToStringToGetNameRector as niche and overly detailed, better refactor reflectio na as a whole ([#3976](https://togithub.com/rectorphp/rector-src/pull/3976))
- Remove RenameNamespaceRector, better handle by IDE or explicit RenameClassRector ([#3979](https://togithub.com/rectorphp/rector-src/pull/3979))
- \[CodeQuality] Deprecate NarrowUnionTypeDocRector as focused on docblocks, and moving to type declarations ([#3848](https://togithub.com/rectorphp/rector-src/pull/3848))
- Remove MakeTypedPropertyNullableIfCheckedRector as old fix of TypedPropertyRector rule, removed months ago ([#3851](https://togithub.com/rectorphp/rector-src/pull/3851))
- \[PHP 8.0] Deprecate old UnionTypesRector that is dangerously moving docblocks, use type declaration rules instead ([#3846](https://togithub.com/rectorphp/rector-src/pull/3846))
- \[CodingStyle] Remove OrderAttributesRector, as rather coding standard and does not have specific PSR example ([#3838](https://togithub.com/rectorphp/rector-src/pull/3838))
- Remove unused PregMatchTypeCorrector, the 3rd param in preg_match_\* is now handled natively by PHPStan ([#3824](https://togithub.com/rectorphp/rector-src/pull/3824))
- \[Restoration] Remove RemoveFinalFromEntityRector as used only to revert very old Rector bug ([#3847](https://togithub.com/rectorphp/rector-src/pull/3847))
### [`v0.16.0`](https://togithub.com/rectorphp/rector/releases/tag/0.16.0): Released Rector 0.16.0
[Compare Source](https://togithub.com/rectorphp/rector/compare/0.15.25...0.16.0)
#### New Features :partying_face:
- \[TypeDeclaration] Add WhileNullableToInstanceofRector ([#3680](https://togithub.com/rectorphp/rector-src/pull/3680))
#### Bugfixes :bug:
- Fix SingleInArrayToCompareRector if array item is variadic ([#3640](https://togithub.com/rectorphp/rector-src/pull/3640)), Thanks [@raoz](https://togithub.com/raoz)!
- \[Php80] Handle crash leaveNode() returned invalid value of type integer on TokenGetAllToObjectRector ([#3644](https://togithub.com/rectorphp/rector-src/pull/3644))
- \[TypeDeclaration] Handle mix InlineHTML on FileWithoutNamespace ([#3648](https://togithub.com/rectorphp/rector-src/pull/3648))
- Simplify PhpFilesFinder ([#3649](https://togithub.com/rectorphp/rector-src/pull/3649)), Thanks [@staabm](https://togithub.com/staabm)!
- \[Test] Rename fixture and refactor to solve random error ([#3677](https://togithub.com/rectorphp/rector-src/pull/3677))
- \[TypeDeclaration] Refactor UnionTypeMapper::narrowBoolType() to allow bool|int|false converted to bool|int ([#3685](https://togithub.com/rectorphp/rector-src/pull/3685))
- Update phpdoc-parser to ^1.20.3 ([#3691](https://togithub.com/rectorphp/rector-src/pull/3691))
- \[Privatization] Skip variable assign append on ChangeReadOnlyVariableWithDefaultValueToConstantRector ([#3687](https://togithub.com/rectorphp/rector-src/pull/3687)), Thanks [@mickeytodd](https://togithub.com/mickeytodd)!
- \[NodeManipulator] clean up multiple instanceof check on AssignManipulator ([#3695](https://togithub.com/rectorphp/rector-src/pull/3695))
- \[CodeQuality] Using local variable $hasChanged on NarrowUnionTypeDocRector ([#3697](https://togithub.com/rectorphp/rector-src/pull/3697))
- Cache on successful file processing ([#3614](https://togithub.com/rectorphp/rector-src/pull/3614)), Thanks [@yguedidi](https://togithub.com/yguedidi)!
- \[CodingStyle] Skip concat on first arg on ConsistentImplodeRector ([#3702](https://togithub.com/rectorphp/rector-src/pull/3702)), Thanks [@nerones](https://togithub.com/nerones)!
- Fix ExplicitMethodCallOverMagicGetSetRector with a protected method ([#3732](https://togithub.com/rectorphp/rector-src/pull/3732)), Thanks [@pierredup](https://togithub.com/pierredup)!
- \[TypeDeclaration] Handle infinite loop on array_reverse with index on AddMethodCallBasedStrictParamTypeRector on php8+ feature ([#3678](https://togithub.com/rectorphp/rector-src/pull/3678))
- \[TypeDeclaration] Handle regression multiple params no longer working on AddMethodCallBasedStrictParamTypeRector ([#3681](https://togithub.com/rectorphp/rector-src/pull/3681))
- \[TypeDeclaration] Add do { } while support on WhileNullableToInstanceofRector ([#3682](https://togithub.com/rectorphp/rector-src/pull/3682))
- \[Php56]\[Php70]\[Php74] Handle infinite loop on AddDefaultValueForUndefinedVariableRector+IfToSpaceshipRector+ClosureToArrowFunctionRector ([#3701](https://togithub.com/rectorphp/rector-src/pull/3701))
#### Performance Improvements :rocket:
- \[Performance] Using findFirst() for cast to (bool) so no need search all found nodes ([#3642](https://togithub.com/rectorphp/rector-src/pull/3642))
- \[Performance] Using cheap chekc first on UndefinedVariableResolver::shouldSkipVariable() ([#3643](https://togithub.com/rectorphp/rector-src/pull/3643))
- \[CodeQuality] Improve SimplifyIfElseToTernaryRector performance ([#3721](https://togithub.com/rectorphp/rector-src/pull/3721))
- \[Renaming] Prevent overly greed type resolving in RenamePropertyRector ([#3700](https://togithub.com/rectorphp/rector-src/pull/3700)), Thanks [@staabm](https://togithub.com/staabm)!
- Don't calculate diffs when `--no-diffs` is given ([#3710](https://togithub.com/rectorphp/rector-src/pull/3710)), Thanks [@staabm](https://togithub.com/staabm)!
- Calculate diff only once per file after refactoring ([#3711](https://togithub.com/rectorphp/rector-src/pull/3711)), Thanks [@staabm](https://togithub.com/staabm)!
- Improve PropertyFetchAnalyzer performance ([#3654](https://togithub.com/rectorphp/rector-src/pull/3654)), Thanks [@staabm](https://togithub.com/staabm)!
- Improve LocalMethodCallFinder performance ([#3651](https://togithub.com/rectorphp/rector-src/pull/3651)), Thanks [@staabm](https://togithub.com/staabm)!
- Improve LocalConstantFinder performance ([#3652](https://togithub.com/rectorphp/rector-src/pull/3652)), Thanks [@staabm](https://togithub.com/staabm)!
- Improve NodeComparator performance ([#3659](https://togithub.com/rectorphp/rector-src/pull/3659)), Thanks [@staabm](https://togithub.com/staabm)!
- Improve ReflectionResolver performance ([#3658](https://togithub.com/rectorphp/rector-src/pull/3658)), Thanks [@staabm](https://togithub.com/staabm)!
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR contains the following updates:
^0.14.6
->^0.17.0
Release Notes
rectorphp/rector (rector/rector)
### [`v0.17.10`](https://togithub.com/rectorphp/rector/releases/tag/0.17.10): Released Rector 0.17.10 [Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.9...0.17.10) #### New Features :partying_face: - \[TypeDeclaration] Add Closure support on NumericReturnTypeFromStrictScalarReturnsRector ([#4631](https://togithub.com/rectorphp/rector-src/pull/4631)) - \[TypeDeclaration] Add Closure support on StrictArrayParamDimFetchRector ([#4632](https://togithub.com/rectorphp/rector-src/pull/4632)) - \[TypeDeclaration] Add Closure support on ReturnTypeFromStrictParamRector ([#4633](https://togithub.com/rectorphp/rector-src/pull/4633)) - \[TypeDeclaration] Add Closure support on StrictStringParamConcatRector ([#4634](https://togithub.com/rectorphp/rector-src/pull/4634))#### Bugfixes :bug: - \[Downgrade] \[FIX] Fix infinite loop in DowngradeArrayFilterNullableCallbackRector ([#150](https://togithub.com/rectorphp/rector-downgrade-php/pull/150)) ### [`v0.17.9`](https://togithub.com/rectorphp/rector/releases/tag/0.17.9): Released Rector 0.17.9 [Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.8...0.17.9) #### Bugfixes :bug: - Fix last arg trailing comma removal DowngradeTrailingCommasInFunctionCallsRector - https://github.com/rectorphp/rector-downgrade-php/commit/059d48366ee50115006a8d26ede574d70da724d2 ### [`v0.17.8`](https://togithub.com/rectorphp/rector/releases/tag/0.17.8): Released Rector 0.17.8 [Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.7...0.17.8) #### New Features :partying_face: - \[TypeDeclaration] Add Closure support on BoolReturnTypeFromStrictScalarReturnsRector ([#4610](https://togithub.com/rectorphp/rector-src/pull/4610)) - AddMethodCallBasedStrictParamTypeRector: Support changing protected methods in final classes ([#4611](https://togithub.com/rectorphp/rector-src/pull/4611)), Thanks [@staabm](https://togithub.com/staabm)! - \[TypeDeclaration] Add StrictStringParamConcatRector ([#4624](https://togithub.com/rectorphp/rector-src/pull/4624))
#### Bugfixes :bug: - \[PHPStanStaticTypeMapper] FQCN for Closure type mapper ([#4584](https://togithub.com/rectorphp/rector-src/pull/4584)) - Fixed constant types handling in TypedPropertyFromStrictConstructorRector ([#4588](https://togithub.com/rectorphp/rector-src/pull/4588)), Thanks [@staabm](https://togithub.com/staabm)! - \[TypeDeclaration] Skip coalesce on StrictArrayParamDimFetchRector ([#4589](https://togithub.com/rectorphp/rector-src/pull/4589)) - Bump to phpdoc-parser 1.23 and fill construct() attributes ([#4590](https://togithub.com/rectorphp/rector-src/pull/4590)) - \[TypeDeclaration] Skip override string on StrictArrayParamDimFetchRector ([#4591](https://togithub.com/rectorphp/rector-src/pull/4591)) - \[Autoloading] Using SimpleParameterProvider on BootstrapFilesIncluder ([#4592](https://togithub.com/rectorphp/rector-src/pull/4592)) - \[Php81] Fix regression skip call by ref on ReadOnlyPropertyRector ([#4593](https://togithub.com/rectorphp/rector-src/pull/4593)) - \[PHPStanStaticTypeMapper] Make use of toPhpDocNode() on ObjectTypeMapper ([#4581](https://togithub.com/rectorphp/rector-src/pull/4581)) - \[PHPStanStaticTypeMapper] Fix IntersectionTypeMapper to make ObjectType have FQCN ([#4598](https://togithub.com/rectorphp/rector-src/pull/4598)) - \[Php81] Skip re-assign with AssignOp on ReadOnlyPropertyRector ([#4600](https://togithub.com/rectorphp/rector-src/pull/4600)) - Reduce ConstExprClassNameDecorator overhead ([#4603](https://togithub.com/rectorphp/rector-src/pull/4603)), Thanks [@staabm](https://togithub.com/staabm)! - Resolve native return-type from native union-type in short ternary ([#4606](https://togithub.com/rectorphp/rector-src/pull/4606)), Thanks [@staabm](https://togithub.com/staabm)! - \[Strict] Skip from docblock [@return](https://togithub.com/return) on DisallowedEmptyRuleFixerRector ([#4608](https://togithub.com/rectorphp/rector-src/pull/4608)) - \[Strict] Skip [@return](https://togithub.com/return) docblock on BooleanInIfConditionRuleFixerRector ([#4609](https://togithub.com/rectorphp/rector-src/pull/4609)) - \[Php81] Fix regression skip call by ref on ReadOnlyPropertyRector on non \__construct method ([#4614](https://togithub.com/rectorphp/rector-src/pull/4614)) - \[CodeQuality]\[Strict] Handle infinite loop on SimplifyDeMorganBinaryRector+SimplifyIfReturnBoolRector+DisallowedEmptyRuleFixerRector ([#4615](https://togithub.com/rectorphp/rector-src/pull/4615)) - \[CodingStyle]\[Namespace\_] Support constant imports ([#4612](https://togithub.com/rectorphp/rector-src/pull/4612)), Thanks [@natepage](https://togithub.com/natepage)! - \[Php81] Skip property fetch from new static on ReadOnlyPropertyRector ([#4617](https://togithub.com/rectorphp/rector-src/pull/4617)) - \[CodingStyle] Handle crash on empty cases on BinarySwitchToIfElseRector ([#4618](https://togithub.com/rectorphp/rector-src/pull/4618)) - Fix string type on StrictArrayParamDimFetchRector ([#4623](https://togithub.com/rectorphp/rector-src/pull/4623)) - \[PHPStanStaticTypeMapper] Handle crash on DowngradeMixedTypeDeclarationRector for PHPStan\Type\ConditionalType ([#4625](https://togithub.com/rectorphp/rector-src/pull/4625)) - \[Php73] Handle crash Type Error on JsonThrowOnErrorRector ([#4626](https://togithub.com/rectorphp/rector-src/pull/4626)) - \[Php81] Skip call by ref on ReadOnlyPropertyRector on FuncCall ([#4630](https://togithub.com/rectorphp/rector-src/pull/4630)) - \[Printer] Fix printing PHPStan AlwaysRememberedExpr with add unwrapper inside BetterStandardPrinter::p ([#4629](https://togithub.com/rectorphp/rector-src/pull/4629)) - \[TypeDeclaration] Skip has parent class method on AddParamTypeFromPropertyTypeRector ([#4627](https://togithub.com/rectorphp/rector-src/pull/4627))
#### Removed :skull: - \[Printer] Remove has InlineHTML node check after apply changes on PhpFileProcessor ([#4601](https://togithub.com/rectorphp/rector-src/pull/4601)) ### [`v0.17.7`](https://togithub.com/rectorphp/rector/releases/tag/0.17.7): Released Rector 0.17.7 [Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.6...0.17.7) #### New Features :partying_face: - \[CodingStyle] Skip filled by construct on AddArrayDefaultToArrayPropertyRector ([#4549](https://togithub.com/rectorphp/rector-src/pull/4549)) - Add constuctor support to ReplaceArgumentDefaultValueRector ([#4554](https://togithub.com/rectorphp/rector-src/pull/4554)) - StaticMapper: added fast path for IdentifierTypeNode ([#4565](https://togithub.com/rectorphp/rector-src/pull/4565)), Thanks [@staabm](https://togithub.com/staabm)! - Add ReturnTypeFromStrictParamRector ([#4501](https://togithub.com/rectorphp/rector-src/pull/4501)), Thanks [@staabm](https://togithub.com/staabm)! - Add TypedPropertyFromStrictConstructorReadonlyClassRector ([#4552](https://togithub.com/rectorphp/rector-src/pull/4552)), Thanks [@staabm](https://togithub.com/staabm)! - ReturnTypeFromStrictTernaryRector: Support complex ternaries ([#4515](https://togithub.com/rectorphp/rector-src/pull/4515)), Thanks [@staabm](https://togithub.com/staabm)! #### Bugfixes :bug: - Support final methods in ClassMethodReturnTypeOverrideGuard ([#4509](https://togithub.com/rectorphp/rector-src/pull/4509)), Thanks [@staabm](https://togithub.com/staabm)! - Support literals in ReturnTypeFromStrictTypedCallRector ([#4511](https://togithub.com/rectorphp/rector-src/pull/4511)), Thanks [@staabm](https://togithub.com/staabm)! - \[TypeDeclaration] Null stmts check early on ReturnTypeFromStrictParamRector ([#4512](https://togithub.com/rectorphp/rector-src/pull/4512)) - \[Performance] Use filtered filePaths from ApplicationFileProcessor::configurePHPStanNodeScopeResolver on WorkerRunner::run() ([#4513](https://togithub.com/rectorphp/rector-src/pull/4513)) - \[DX] Show progress bar 100% on RectorConsoleOutputFormatter::report() ([#4516](https://togithub.com/rectorphp/rector-src/pull/4516)) - \[ChangesReporting] Reuse defined errors vairable on ConsoleOutputFormatter ([#4517](https://togithub.com/rectorphp/rector-src/pull/4517)) - \[ApplicationFileProcessor] Refactor ApplicationFileProcessor to filter file paths early before run both parallel and non-parallel ([#4519](https://togithub.com/rectorphp/rector-src/pull/4519)) - \[DX] Fix hang on twice run after all files processed cached ([#4521](https://togithub.com/rectorphp/rector-src/pull/4521)) - \[Application] Move filter files by config extensions to FileFactory ([#4522](https://togithub.com/rectorphp/rector-src/pull/4522)) - \[Php81]\[Php82]\[Privatization] Handle extends non-readonly class on ReadOnlyPropertyRector+ReadOnlyClassRector+FinalizeClassesWithoutChildrenRector ([#4524](https://togithub.com/rectorphp/rector-src/pull/4524)) - Fix wrong results in RemoveAlwaysElseRector ([#4527](https://togithub.com/rectorphp/rector-src/pull/4527)), Thanks [@jlherren](https://togithub.com/jlherren)! - Support class-const-fetch in ReturnTypeFromStrictTypedCallRector ([#4520](https://togithub.com/rectorphp/rector-src/pull/4520)), Thanks [@staabm](https://togithub.com/staabm)! - \[EarlyReturn] Skip append variable on PreparedValueToEarlyReturnRector ([#4530](https://togithub.com/rectorphp/rector-src/pull/4530)) - Refactor MyCLabs\Enum\Enum::equals calls to comparisons ([#4532](https://togithub.com/rectorphp/rector-src/pull/4532)), Thanks [@rojtjo](https://togithub.com/rojtjo)! - \[Performance]\[NodeManipulator] Avoid loop on search first variable named on next sliced next stmts on StmtsManipulator ([#4537](https://togithub.com/rectorphp/rector-src/pull/4537)) - \[Performance] \[TypeDeclaration] Reduce resolve ClassReflection on each property on TypedPropertyFromStrictConstructorRector ([#4536](https://togithub.com/rectorphp/rector-src/pull/4536)) - \[Performance]\[TypeDeclaration] Reduce resolve ClassReflection from Property on AllAssignNodePropertyTypeInferer ([#4539](https://togithub.com/rectorphp/rector-src/pull/4539)) - \[Application] Merge process files on both parallel and non-parallel process ([#4523](https://togithub.com/rectorphp/rector-src/pull/4523)) - \[PHPStan] Merge assert phpstan errors to one ([#4544](https://togithub.com/rectorphp/rector-src/pull/4544)) - \[Performance] \[Php74] Reduce ClassReflection lookup from property on PropertyTypeChangeGuard ([#4545](https://togithub.com/rectorphp/rector-src/pull/4545)) - Use instanceof check on ClassReflection resolve ([#4547](https://togithub.com/rectorphp/rector-src/pull/4547)) - \[Reflection] Reduce Scope pulling on ReflectionResolver ([#4548](https://togithub.com/rectorphp/rector-src/pull/4548)) - \[Strict] Skip empty() from param doc on DisallowedEmptyRuleFixerRector ([#4550](https://togithub.com/rectorphp/rector-src/pull/4550)) - Fix space in paths ([#4553](https://togithub.com/rectorphp/rector-src/pull/4553)) - Skip traits in CountOnNullRector ([#4556](https://togithub.com/rectorphp/rector-src/pull/4556)) - Make use of toPhpDocNode() - take [#2](https://togithub.com/rectorphp/rector/issues/2) ([#4555](https://togithub.com/rectorphp/rector-src/pull/4555)) - \[Performance] \[PostRector] Only check phpdocinfo on Stmt and Param on NameImportingPostRector ([#4558](https://togithub.com/rectorphp/rector-src/pull/4558)) - \[CodeQuality] Skip pull property from inner class on CompleteDynamicPropertiesRector ([#4561](https://togithub.com/rectorphp/rector-src/pull/4561)) - Prevent unnecessary scope creation ([#4562](https://togithub.com/rectorphp/rector-src/pull/4562)), Thanks [@staabm](https://togithub.com/staabm)! - NameImportingPhpDocNodeVisitor: Cheap checks first ([#4563](https://togithub.com/rectorphp/rector-src/pull/4563)), Thanks [@staabm](https://togithub.com/staabm)! - \[Performance]\[Renaming] No need PhpDocInfo refactor on Name node on ClassRenamer ([#4566](https://togithub.com/rectorphp/rector-src/pull/4566)) - \[TypeDeclaration] Deprecate ArrayShapeFromConstantArrayReturnRector as uses docblocks that we move away from since 0.15 ([#4571](https://togithub.com/rectorphp/rector-src/pull/4571)) - Make ReturnTypeFromStrictNewArrayRector handle only single level arrays ([#4575](https://togithub.com/rectorphp/rector-src/pull/4575)) - Fix array mapping ([#4576](https://togithub.com/rectorphp/rector-src/pull/4576)) - \[Performance] \[PostRector] Reduce repetitive resolve uses statements on NameImportingPostRector ([#4579](https://togithub.com/rectorphp/rector-src/pull/4579)) - \[EarlyReturn] Handle multiple statements in else in ChangeIfElseValueAssignToEarlyReturnRector ([#4580](https://togithub.com/rectorphp/rector-src/pull/4580)), Thanks [@dorrogeray](https://togithub.com/dorrogeray)! - \[BUGFIX] Ensure proper reprint with attributes for finalized classes ([#4585](https://togithub.com/rectorphp/rector-src/pull/4585)), Thanks [@cngJo](https://togithub.com/cngJo)!
#### Removed :skull: - \[DX] Remove AllowEmptyConfigurableRectorInterface to ease interface tree, better handle on particular configure() method inside the rule ([#4540](https://togithub.com/rectorphp/rector-src/pull/4540)) - Skip description on same line, remove on next line as based on phpdoc-parser in RemoveUselessParamTagRector ([#4551](https://togithub.com/rectorphp/rector-src/pull/4551)) - \[Performance]\[PostRector] Remove alias exists check on NameImporter called from NameImportingPostRector ([#4564](https://togithub.com/rectorphp/rector-src/pull/4564)) - \[Performance]\[BetterPhpDocParser] Remove unused ConstExprNode check on ConstExprClassNameDecorator ([#4578](https://togithub.com/rectorphp/rector-src/pull/4578)) - \[PHPStanStaticTypeMapper] Remove manual type check on PHPStanStaticTypeMapper ([#4583](https://togithub.com/rectorphp/rector-src/pull/4583)) - \[StaticTypeMapper] Remove standalone false handling on StaticTypeMapper ([#4582](https://togithub.com/rectorphp/rector-src/pull/4582)) ### [`v0.17.6`](https://togithub.com/rectorphp/rector/releases/tag/0.17.6): Released Rector 0.17.6 [Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.5...0.17.6) In this release, we narrowed rules from PHPUit and Doctrine to their specific version category. We've detected few outdated and never used rules and cleaned them up to make Rector smaller and easier to use :+1: Be use to always use `*SetList` constants over specific rules to use the latest version: ```php use Rector\Config\RectorConfig; return static function (RectorConfig $rectorConfig): void { $rectorConfig->sets([ \Rector\PHPUnit\Set\PHPUnitLevelSetList::UP_TO_PHPUNIT_100, ]); }; ``` #### New Features :partying_face: - Add PHPUnit to sets ([#4495](https://togithub.com/rectorphp/rector-src/pull/4495)) - \[CI] Add PHPUnit 10 to check rules and sets groups ([#4500](https://togithub.com/rectorphp/rector-src/pull/4500)) - \[CI] Add doctrine rules in set check ([#4505](https://togithub.com/rectorphp/rector-src/pull/4505))
#### Bugfixes :bug: - \[Performance] Only set Attribute on context inside ArrayDimFetch and ArrayItem on specific node used ([#4493](https://togithub.com/rectorphp/rector-src/pull/4493)) - \[Php52] Use instanceof check instead of compare object $newStmt === $caseStmt on ContinueToBreakInSwitchRector ([#4494](https://togithub.com/rectorphp/rector-src/pull/4494)) - Exclude the full docs folder from archives ([#4497](https://togithub.com/rectorphp/rector-src/pull/4497)), Thanks [@stof](https://togithub.com/stof)! - Cleanup RecastingRemovalRector tests ([#4498](https://togithub.com/rectorphp/rector-src/pull/4498)) - Move Rector order test to PHPUnit, as uses its rules ([#4499](https://togithub.com/rectorphp/rector-src/pull/4499)) - let phpunit handle its own empty method rule ([#4501](https://togithub.com/rectorphp/rector-src/pull/4501)), Thanks [@staabm](https://togithub.com/staabm)! - Micro optimizations: cheap checks first ([#4510](https://togithub.com/rectorphp/rector-src/pull/4510)), Thanks [@staabm](https://togithub.com/staabm)! - Skip coalsce assign in RemoveUnusedPrivatePropertyRector ([#4491](https://togithub.com/rectorphp/rector-src/pull/4491)) - \[DeadCode] Skip append += assignment on RemoveUnusedPrivatePropertyRector ([#4506](https://togithub.com/rectorphp/rector-src/pull/4506)) - \[AstResolver]\[Performance] Remove unnecessary double File read on AstResolver::parseFileNameToDecoratedNodes() ([#4508](https://togithub.com/rectorphp/rector-src/pull/4508))
#### Removed :skull: - \[NodeTypeResolver] Remove unused AttributeKey::INSIDE_ARRAY_ITEM on ContextNodeVisitor ([#4496](https://togithub.com/rectorphp/rector-src/pull/4496)) - \[NodeTypeResolver] Remove AttributeKey::IS_RETURN_EXPR from ContextNodeVisitor ([#4502](https://togithub.com/rectorphp/rector-src/pull/4502)) - \[NodeTypeResolver] Remove AttributeKey::IS_ISSET_VAR from ContextNodeVisitor ([#4503](https://togithub.com/rectorphp/rector-src/pull/4503)) - \[NodeTypeResolver] Remove nestedChainMethodCallLimit() for deep method call counter check ([#4504](https://togithub.com/rectorphp/rector-src/pull/4504)) ### [`v0.17.5`](https://togithub.com/rectorphp/rector/releases/tag/0.17.5): Released Rector 0.17.5 [Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.4...0.17.5) #### Removed :skull: - \[DeadCode] Skip property not exists on RemoveTypedPropertyDeadInstanceOfRector ([#4481](https://togithub.com/rectorphp/rector-src/pull/4481)) - \[CodeQuality]\[Php80] Handle infite loop swap params on RemoveUnusedVariableInCatchRector + OptionalParametersAfterRequiredRector ([#4484](https://togithub.com/rectorphp/rector-src/pull/4484))
#### Bugfixes :bug: - fix(rules): Skip readonly classes from restoring default null value. ([#4479](https://togithub.com/rectorphp/rector-src/pull/4479)), Thanks [@scyzoryck](https://togithub.com/scyzoryck)! - \[Php80] Handle crash on ClassOnObjectRector + GetDebugTypeRector ([#4483](https://togithub.com/rectorphp/rector-src/pull/4483)) - \[Strict] Fix DisallowedEmptyRuleFixerRector on empty string isset ([#4485](https://togithub.com/rectorphp/rector-src/pull/4485)) - Fix StrictArrayParamDimFetchRector on `is_*` calls ([#4486](https://togithub.com/rectorphp/rector-src/pull/4486)), Thanks [@staabm](https://togithub.com/staabm)! - Fix trait rename in Php4ConsturctorRector ([#4487](https://togithub.com/rectorphp/rector-src/pull/4487)) - Fix StrictArrayParamDimFetchRector on same named property ([#4488](https://togithub.com/rectorphp/rector-src/pull/4488)), Thanks [@staabm](https://togithub.com/staabm)! ### [`v0.17.4`](https://togithub.com/rectorphp/rector/releases/tag/0.17.4): Released Rector 0.17.4 [Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.3...0.17.4) #### Bugfixes :bug: - \[CodeQuality]\[EarlyReturn] Handle crash Replace Stmt to Expr on FlipTypeControlToUseExclusiveTypeRector+FlipTypeControlToUseExclusiveTypeRector+ReturnBinaryOrToEarlyReturnRector ([#4474](https://togithub.com/rectorphp/rector-src/pull/4474)) - Fix ReturnBinaryOrToEarlyReturnRector mixing up returned nodes of array, hook into StmtsAwareInterface instead to keep next Rector rules updated ([#4476](https://togithub.com/rectorphp/rector-src/pull/4476))
#### Removed :skull: - Remove duplicated version_compare ReplaceFuncCallArgumentDefaultValue rule ([#4473](https://togithub.com/rectorphp/rector-src/pull/4473)), Thanks [@alexander-schranz](https://togithub.com/alexander-schranz)! - \[EarlyReturn] Remove ReturnBinaryAndToEarlyReturnRector as creates code hard to read and flips condition ([#4478](https://togithub.com/rectorphp/rector-src/pull/4478)) ### [`v0.17.3`](https://togithub.com/rectorphp/rector/releases/tag/0.17.3): Released Rector 0.17.3 [Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.2...0.17.3) In this release we continue preparing for Rector 1.0 release [https://github.com/rectorphp/rector/issues/7854](https://togithub.com/rectorphp/rector/issues/7854) This includes **removing last parent node** connections, to lower node tree memory consumption 🥳️🥳️🥳️ - \[EarlyReturn] Remove findFirstNext() on InvertedIfFactory ([#4399](https://togithub.com/rectorphp/rector-src/pull/4399)) - \[DX] Remove findParentType() method ([#4438](https://togithub.com/rectorphp/rector-src/pull/4438)) - \[DX] Remove parent node from AbstractRector ([#4465](https://togithub.com/rectorphp/rector-src/pull/4465))
#### New Features :partying_face: - Add float mul integer type to NumericReturnTypeFromStrictScalarReturnsRector ([#4376](https://togithub.com/rectorphp/rector-src/pull/4376)) - \[TypeDeclaration] Add Encapsed string support to AlwaysStrictScalarExprAnalyzer ([#4382](https://togithub.com/rectorphp/rector-src/pull/4382)) - \[TypeDeclaration] Add StrictArrayParamDimFetchRector ([#4384](https://togithub.com/rectorphp/rector-src/pull/4384)) - \[DX] Kick of SimpleParameterProvider ([#4405](https://togithub.com/rectorphp/rector-src/pull/4405))
#### Bugfixes :bug: - \[DeadCode] Skip non typed param numeric check on RecastingRemovalRector ([#4390](https://togithub.com/rectorphp/rector-src/pull/4390)) - \[Renaming] Handle crash on catch Exception name on RenameClassRector ([#4401](https://togithub.com/rectorphp/rector-src/pull/4401)) - Fix NumericReturnTypeFromStrictScalarReturnsRector for non-natively-typed parameters ([#4380](https://togithub.com/rectorphp/rector-src/pull/4380)), Thanks [@staabm](https://togithub.com/staabm)! - \[Php82] Skip extends unknown class on ReadonlyClassRector ([#4408](https://togithub.com/rectorphp/rector-src/pull/4408)) - \[TypeDeclaration] Handle crash on no namespace with + operation on DeclareStrictTypesRector ([#4414](https://togithub.com/rectorphp/rector-src/pull/4414)) - \[NodeTypeResolver] Reduce duplicated Scope fill on FuncCall ([#4428](https://togithub.com/rectorphp/rector-src/pull/4428)) - Make JsonThrowOnErrorRector work with local scope to detect error_json methods ([#4451](https://togithub.com/rectorphp/rector-src/pull/4451)) - Deprecate resolveNextNode() to work only in current node tree context ([#4455](https://togithub.com/rectorphp/rector-src/pull/4455)) - \[Naming] Skip used on next foreach on RenameForeachValueVariableToMatchExprVariableRector ([#4469](https://togithub.com/rectorphp/rector-src/pull/4469))
#### Removed :skull: - Remove duplicate ReturnNeverTypeRector rule ([#4381](https://togithub.com/rectorphp/rector-src/pull/4381)), Thanks [@buffcode](https://togithub.com/buffcode)! - \[MysqlToMysqli] Deprecate set, as dangerous to use, better handle manually ([#4448](https://togithub.com/rectorphp/rector-src/pull/4448)) - \[DX] Make use of SimpleParameterProvider directly, deprecate RectorConfigProvider ([#4460](https://togithub.com/rectorphp/rector-src/pull/4460)) - \[Performance] Immediate remove UnreachableStatementNodeVisitor object after traverse to avoid re-use in next file ([#4417](https://togithub.com/rectorphp/rector-src/pull/4417)) - \[NodeTypeResolver] Remove ArrayItem scope filling from Array\_ and Name filling for Catch types on PHPStanNodeScopeResolver ([#4423](https://togithub.com/rectorphp/rector-src/pull/4423)) - \[PHP 8] Resources object upgrade - remove 2 rules as the upgrade require wholesome manual work ([#4442](https://togithub.com/rectorphp/rector-src/pull/4442)) - \[DeadCode] Remove RemoveJustVariableAssignRector as often done on purpose or with side effect ([#4450](https://togithub.com/rectorphp/rector-src/pull/4450)) - Remove deprecated resolveNextNode() to embrace local scope node ([#4456](https://togithub.com/rectorphp/rector-src/pull/4456)) - \[DX] Remove node connecting traverser from AbstractRector ([#4463](https://togithub.com/rectorphp/rector-src/pull/4463)) - Remove NodeConnectingTraverser ([#4464](https://togithub.com/rectorphp/rector-src/pull/4464)) - \[DX] Remove autowrapping of expr/stmt to make return values in the same type and reliable ([#4466](https://togithub.com/rectorphp/rector-src/pull/4466)) ### [`v0.17.2`](https://togithub.com/rectorphp/rector/releases/tag/0.17.2): Released Rector 0.17.2 [Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.1...0.17.2) In this release we continue preparing for Rector 1.0 release [https://github.com/rectorphp/rector/issues/7854](https://togithub.com/rectorphp/rector/issues/7854) This includes: - removing more parent node connections, to lower node tree memory consumption
#### New Features :partying_face: - Add sleep after processPool->quitAll() to give time for all child processes to terminate ([#4280](https://togithub.com/rectorphp/rector-src/pull/4280)), Thanks [@dorrogeray](https://togithub.com/dorrogeray)! - \[TypeDeclaration] Add NumericReturnTypeFromStrictScalarReturnsRector ([#4296](https://togithub.com/rectorphp/rector-src/pull/4296)) - \[Php71] Add Closure support on AssignArrayToStringRector ([#4303](https://togithub.com/rectorphp/rector-src/pull/4303)) - Introduces `AddSensitiveParameterAttributeRector` rule ([#4342](https://togithub.com/rectorphp/rector-src/pull/4342)), Thanks [@peterfox](https://togithub.com/peterfox)! - Bump nikic/php-parser to 4.16.0 ([#4343](https://togithub.com/rectorphp/rector-src/pull/4343)) - Show error when no files will be processed ([#4326](https://togithub.com/rectorphp/rector-src/pull/4326)), Thanks [@staabm](https://togithub.com/staabm)! - Cache unchanged files on dry run v2 ([#4281](https://togithub.com/rectorphp/rector-src/pull/4281)), Thanks [@dorrogeray](https://togithub.com/dorrogeray)!
#### Bugfixes :bug: - \[CodeQuality] Handle crash on variable variable on OptionalParametersAfterRequiredRector ([#4226](https://togithub.com/rectorphp/rector-src/pull/4226)) - Fix LocallyCalledStaticMethodToNonStaticRector with method args ([#4233](https://togithub.com/rectorphp/rector-src/pull/4233)), Thanks [@toastedghost](https://togithub.com/toastedghost)! - Use `FunctionLike` contract instead of union of function-like concrete implementations ([#4241](https://togithub.com/rectorphp/rector-src/pull/4241)), Thanks [@Wirone](https://togithub.com/Wirone)! - \[CodeQuality]\[Performance] Reduce repetitive NodeTypeResolver->getType() on ExprBoolCaster ([#4279](https://togithub.com/rectorphp/rector-src/pull/4279)) - Skip rewindable generator ([#4282](https://togithub.com/rectorphp/rector-src/pull/4282)) - \[Php55]\[NodeTypeResolver] Handle crash on dynamic variable concat assign on StringClassNameToClassConstantRector ([#4283](https://togithub.com/rectorphp/rector-src/pull/4283)) - \[Php55] Clean up FullyQualified assigned to FullyQualified on StringClassNameToClassConstantRector ([#4284](https://togithub.com/rectorphp/rector-src/pull/4284)) - \[TypeDeclaration] Extend NumericReturnTypeFromStrictScalarReturnsRector ([#4297](https://togithub.com/rectorphp/rector-src/pull/4297)) - Skip divide in NumericReturnTypeFromStrictScalarReturnsRector ([#4298](https://togithub.com/rectorphp/rector-src/pull/4298)) - \[TypeDeclaration] Skip once typed and else return array_map() on ReturnTypeFromStrictTypedCallRector ([#4312](https://togithub.com/rectorphp/rector-src/pull/4312)) - Fix command to configure rector ([#4314](https://togithub.com/rectorphp/rector-src/pull/4314)), Thanks [@bertramakers](https://togithub.com/bertramakers)! - \[Performance] \[NodeTypeResolver] Reduce callable traverse usage on ContextNodeVisitor ([#4317](https://togithub.com/rectorphp/rector-src/pull/4317)) - \[CodeQuality] Skip not regex on SimplifyRegexPatternRector ([#4322](https://togithub.com/rectorphp/rector-src/pull/4322)) - \[TypeDeclaration] Handle crash on object shape on ArrayShapeFromConstantArrayReturnRector ([#4323](https://togithub.com/rectorphp/rector-src/pull/4323)) - \[Php81] Skip named constructor on ReadOnlyPropertyRector ([#4359](https://togithub.com/rectorphp/rector-src/pull/4359)) - Skip argument if value equals default value ([#4368](https://togithub.com/rectorphp/rector-src/pull/4368)), Thanks [@stefantalen](https://togithub.com/stefantalen)! - \[MysqlToMysqli] Handle infinite loop on MysqlQueryMysqlErrorWithLinkRector when no connection instance on first dept stmt ([#4375](https://togithub.com/rectorphp/rector-src/pull/4375))
#### Removed :skull: - Remove `removeNode()` method from AbstractRector ([#4225](https://togithub.com/rectorphp/rector-src/pull/4225)) - Remove Kind from doc mapper, as used just once ([#4234](https://togithub.com/rectorphp/rector-src/pull/4234)) - Move LocallyCalledStaticMethodToNonStaticRector to CodeQuality namespace, to avoid dumping removed static set ([#4242](https://togithub.com/rectorphp/rector-src/pull/4242)) - Restore RemoveMethodCallParamRector as used ([#4244](https://togithub.com/rectorphp/rector-src/pull/4244)) - \[Performance] Remove NODES_TO_MATCH constant on RemoveNonExistingVarAnnotationRector ([#4267](https://togithub.com/rectorphp/rector-src/pull/4267)) - Remove VarConstantCommentRector as using unreliable docblocks, better use upcoming PHP 8.3 strict type const ([#4307](https://togithub.com/rectorphp/rector-src/pull/4307)) - \[Naming] Remove BreakingVariableRenameGuard::isUsedInIfAndOtherBranches() to remove previous by types ([#4319](https://togithub.com/rectorphp/rector-src/pull/4319)) - \[Php81] Remove cast check on NullToStrictStringFuncCallArgRector ([#4320](https://togithub.com/rectorphp/rector-src/pull/4320)) - \[PhpParser] Remove BetterNodeFinder::findFirstPreviousOfTypes() ([#4327](https://togithub.com/rectorphp/rector-src/pull/4327)) - Move AddMethodParentCallRector to Symfony Rector ([#4301](https://togithub.com/rectorphp/rector-src/pull/4301)) ### [`v0.17.1`](https://togithub.com/rectorphp/rector/releases/tag/0.17.1): Released Rector 0.17.1 [Compare Source](https://togithub.com/rectorphp/rector/compare/0.17.0...0.17.1) In this release we continue preparing for Rector 1.0 release [https://github.com/rectorphp/rector/issues/7854](https://togithub.com/rectorphp/rector/issues/7854) This includes: - removing more parent node connections, to lower node tree memory consumption - replacing `removeNode()` method with `return NodeTraverser::REMOVE_NODE` direct constant to make changes happen directly in the Rector rule - refactoring node adding from post-process to directly in the rule
#### New Features :partying_face: - \[Docblock] Move DocBlockUpdater service usage from AbstractRector to PhpDocTypeChanger ([#4215](https://togithub.com/rectorphp/rector-src/pull/4215)) - Improve string support in Doctrine Annotations ([#3645](https://togithub.com/rectorphp/rector-src/pull/3645)), Thanks [@yguedidi](https://togithub.com/yguedidi)! - \[Php80] Fix add default nullable type on ClassPropertyAssignToConstructorPromotionRector ([#4091](https://togithub.com/rectorphp/rector-src/pull/4091)) - Add STRICT_BOOLEANS set ([#4116](https://togithub.com/rectorphp/rector-src/pull/4116))
#### Changes - \[FileProcessor] Add warning instead of skip InlineHTML on PhpFileProcessor ([#4058](https://togithub.com/rectorphp/rector-src/pull/4058)) - Remove node adding collector ([#4095](https://togithub.com/rectorphp/rector-src/pull/4095)) - Remove propperty to add collector, add them directly or as a constructor dependency ([#4131](https://togithub.com/rectorphp/rector-src/pull/4131)) - Move ReturnArrayClassMethodToYieldRector to PHPUnit Rector ([#4213](https://togithub.com/rectorphp/rector-src/pull/4213))
#### Bugfixes :bug: - \[CodeQuality] Exclude first class callable from IntvalToTypeCastRector ([#7962](https://togithub.com/rectorphp/rector/issues/7962)) ([#4040](https://togithub.com/rectorphp/rector-src/pull/4040)), Thanks [@thbley](https://togithub.com/thbley)! - \[CodingStyle] Skip first class callable on UnSpreadOperatorRector ([#4041](https://togithub.com/rectorphp/rector-src/pull/4041)) - Skip StrvalToType for strval first class callable syntax ([#4046](https://togithub.com/rectorphp/rector-src/pull/4046)), Thanks [@NicoImparfait](https://togithub.com/NicoImparfait)! - Ensure check isFirstClassCallable() before node->getArgs() on CallLike ([#4049](https://togithub.com/rectorphp/rector-src/pull/4049)) - \[CodeQuality] Skip multiple assigns append before foreach on ForeachItemsAssignToEmptyArrayToAssignRector ([#4052](https://togithub.com/rectorphp/rector-src/pull/4052)) - \[CodeQuality] Skip deep append in if foreach before on ForeachItemsAssignToEmptyArrayToAssignRector ([#4053](https://togithub.com/rectorphp/rector-src/pull/4053)) - \[NodeTypeResolver] Handle crash after next exit() on no namespaced code after removal next attribute ([#4074](https://togithub.com/rectorphp/rector-src/pull/4074)) - \[FileProcessor] Show warning on has InlineHTML node if file has changed on PhpFileProcessor ([#4079](https://togithub.com/rectorphp/rector-src/pull/4079)) - Make SimplifyRegexPatternRector work without parent nodes + deprecate BetterNodeFinder and findParent\* methods ([#4105](https://togithub.com/rectorphp/rector-src/pull/4105)) - Fix StaticCallOnNonStaticToInstanceCallRector to skip parent's parent's method calls. ([#4098](https://togithub.com/rectorphp/rector-src/pull/4098)), Thanks [@klimslim](https://togithub.com/klimslim)! - \[CodingStyle] Skip countable object on CountArrayToEmptyArrayComparisonRector ([#4108](https://togithub.com/rectorphp/rector-src/pull/4108)) - \[DeadCode] Skip used on Closure use next stmt on RemoveUnusedVariableAssignRector ([#4042](https://togithub.com/rectorphp/rector-src/pull/4042)) - \[CodeQuality] Handle throw after if on ConsecutiveNullCompareReturnsToNullCoalesceQueueRector ([#4107](https://togithub.com/rectorphp/rector-src/pull/4107)) - \[CodeQuality] Handle return new object and no return on ConsecutiveNullCompareReturnsToNullCoalesceQueueRector ([#4112](https://togithub.com/rectorphp/rector-src/pull/4112)) - Make ConvertStaticPrivateConstantToSelfRector work for non-final classes, make part of code-quality set ([#4114](https://togithub.com/rectorphp/rector-src/pull/4114)) - StringClassNameToClassConstantRector: cheap checks first ([#4151](https://togithub.com/rectorphp/rector-src/pull/4151)), Thanks [@staabm](https://togithub.com/staabm)! - Reduce memory-consumption by simpler skip-patterns ([#4152](https://togithub.com/rectorphp/rector-src/pull/4152)), Thanks [@staabm](https://togithub.com/staabm)! - Skipping: Use plain string functions instead of regex matching ([#4153](https://togithub.com/rectorphp/rector-src/pull/4153)), Thanks [@staabm](https://togithub.com/staabm)! - Split instance of check to 2 rules ([#4165](https://togithub.com/rectorphp/rector-src/pull/4165)) - Performance: Prevent sorting of files in PhpFilesFinder ([#4164](https://togithub.com/rectorphp/rector-src/pull/4164)), Thanks [@staabm](https://togithub.com/staabm)! - Move PreferThisOrSelfMethodCallRector to PHPUnit rector package, to handle exact cases ([#4194](https://togithub.com/rectorphp/rector-src/pull/4194)) - \[Renaming] Handle crash in trait use on RenameClassRector ([#4196](https://togithub.com/rectorphp/rector-src/pull/4196)) - \[Php56] Handle infinite loop on big array method call on AddDefaultValueForUndefinedVariableRector ([#4142](https://togithub.com/rectorphp/rector-src/pull/4142)) - \[Php56] Skip variable variable on AddDefaultValueForUndefinedVariableRector ([#4148](https://togithub.com/rectorphp/rector-src/pull/4148))
#### Removed :skull: - \[DeadCode] Remove removeNode() from RemoveDeadReturnRector, merge RemoveLastReturnRector to RemoveDeadReturnRector ([#4085](https://togithub.com/rectorphp/rector-src/pull/4085)) - \[PHP+HTML cleanup] Remove MixPhpHtmlDecorator ([#4054](https://togithub.com/rectorphp/rector-src/pull/4054)) - Remove HTML + PHP support, as must be handled in php-parser first ([#4051](https://togithub.com/rectorphp/rector-src/pull/4051)) - Remove MultipleClassFileToPsr4ClassesRector as only PSR4 rule, bit risky and better handled with PHPStan + remove adding/removing files logic, use printer instead ([#4117](https://togithub.com/rectorphp/rector-src/pull/4117)) - Remove NormalizeNamespaceByPSR4ComposerAutoloadRector as only moves files to namespaces, does not update any class referenes; better use IDE here ([#4057](https://togithub.com/rectorphp/rector-src/pull/4057)) - Remove MultipleClassFileToPsr4ClassesRector as only PSR4 rule, bit risky and better handled with PHPStan + remove adding/removing files logic, use printer instead ([#4117](https://togithub.com/rectorphp/rector-src/pull/4117)) - Remove AttributeCompatibleAnnotationRector, as only for one-time migration of private project, not suitable for general use ([#4064](https://togithub.com/rectorphp/rector-src/pull/4064)) - Remove RemoveAlwaysTrueConditionSetInConstructor, as overly specific and not practical; better handle with PHPStan ([#4065](https://togithub.com/rectorphp/rector-src/pull/4065)) - Remove deprecated UnionTypesRector and NarrowUnionTypeDocRector, use strict-based rules from TypeDeclaration set instead ([#4069](https://togithub.com/rectorphp/rector-src/pull/4069)) - Remove TargetRemoveClassMethodRector, as IDE specific ([#4076](https://togithub.com/rectorphp/rector-src/pull/4076)) - Remove ArrayKeysAndInArrayToArrayKeyExistsRector as narrow, does not check variable usage and might be on purpose ([#4084](https://togithub.com/rectorphp/rector-src/pull/4084)) - Remove ChangeGlobalVariablesToPropertiesRector as the scope might change after the variable is defined, better handle with PHPStan ([#4086](https://togithub.com/rectorphp/rector-src/pull/4086)) - Remove NewToConstructorInjectionRector as unused and only for demo purposes ([#4087](https://togithub.com/rectorphp/rector-src/pull/4087)) - \[NodeTraverser] Remove double apply FileWithoutNamespace, remove recursive lookup stmts on BetterStandardPrinter ([#4097](https://togithub.com/rectorphp/rector-src/pull/4097)) - Remove ActionInjectionToConstructorInjectionRector as rather for demo purposes, not practical ([#4113](https://togithub.com/rectorphp/rector-src/pull/4113)) - Remove ConstantListClassToEnumRector as custom-made, not practical for enum upgrades ([#4115](https://togithub.com/rectorphp/rector-src/pull/4115)) - Remove RemoveMethodCallParamRector, as unused ([#4119](https://togithub.com/rectorphp/rector-src/pull/4119)) - Remove RemoveAllowDynamicPropertiesAttributeRector as attribute is a comment on lower PHP versions, also rather downgrade rule ([#4120](https://togithub.com/rectorphp/rector-src/pull/4120)) - Remove DoctrineAnnotationClassToAttributeRector as made for custom project, not useful for general use ([#4127](https://togithub.com/rectorphp/rector-src/pull/4127)) - Remove UnsetAndIssetToMethodCallRector as unused ([#4123](https://togithub.com/rectorphp/rector-src/pull/4123)) - Remove MethodCallToMethodCallRector as unused ([#4128](https://togithub.com/rectorphp/rector-src/pull/4128)) - Remove NewArgToMethodCallRector as unused ([#4130](https://togithub.com/rectorphp/rector-src/pull/4130)) - Remove RemoveDelegatingParentCallRector as overly complex and usually on purpose ([#4136](https://togithub.com/rectorphp/rector-src/pull/4136)) - Remove RemoveEmptyMethodCallRector as better handled by PHPStan ([#4161](https://togithub.com/rectorphp/rector-src/pull/4161)) - Remove BetterNodeFinder::findLastInstanceOf() as unused + make resolvePreviousNode() private, as used only locally ([#4195](https://togithub.com/rectorphp/rector-src/pull/4195)) - \[DeadCode] Remove Assign and AssignRef as node types on RemoveNonExistingVarAnnotationRector ([#4209](https://togithub.com/rectorphp/rector-src/pull/4209)) ### [`v0.17.0`](https://togithub.com/rectorphp/rector/releases/tag/0.17.0): Released Rector 0.17 [Compare Source](https://togithub.com/rectorphp/rector/compare/0.16.0...0.17.0) #### Preparing for Rector 1.0 In this release, we focus on architecture improvements before reaching Rector 1.0. We want to lower the memory usage and make Rector run faster. **This include removing next/previous nodes** - this will most likely not affect you, as Rector rules were upgraded, but if you do you use them, switch to `StmtsAwareInterface` instead We follow PHPStan 1.6 move from April 2022, where you can **learn more**: https://phpstan.org/blog/preprocessing-ast-for-custom-rules - Replace NodeConnectingVisitor with ParentConnectingVisitor ([#3900](https://togithub.com/rectorphp/rector-src/pull/3900)) To see how to refactor to `StmtsAwareInterface`, check these PRs: - Remove NEXT_NODE dependency in ChangeAndIfToEarlyReturnRector, narrow to only closed scope function likes ([#3913](https://togithub.com/rectorphp/rector-src/pull/3913)) - Remove NEXT_NODE from SimplifyIfReturnBoolRector ([#3915](https://togithub.com/rectorphp/rector-src/pull/3915)) - \[DeadCode] Remove next attribute on RemoveUnusedVariableAssignRector (\[[#3917](https://togithub.com/rectorphp/rector/issues/3917)]\(https://github.com/rectorphp/ - \[CodingStyle] Refactor CatchExceptionNameMatchingTypeRector to use StmtsAwareInterface ([#3788](https://togithub.com/rectorphp/rector-src/pull/3788))
#### Add/remove nodes directly 👍 The next improvement focuses on explicit node adding/removal. Thanks to `StmtsAwareInterface` we can add nodes directly. This makes Rector `refactor()` method contain all the code you need. - Cleanup usage of NodesToAddCollector, return nodes directly instead ([#4003](https://togithub.com/rectorphp/rector-src/pull/4003)) - Cleanup removeNodeFromStatements(), removeArg(), removeParam(), removeStmt() methods and remove nodes directly ([#4012](https://togithub.com/rectorphp/rector-src/pull/4012)) - Remove unused addNodeAfterNode(), return nodes instead ([#4023](https://togithub.com/rectorphp/rector-src/pull/4023)) - Remove unused method addNodesBeforeNode() ([#4024](https://togithub.com/rectorphp/rector-src/pull/4024))
#### New Features :partying_face: - \[PHP 7.0] Add `IfIssetToCoalescingRector` ([#3878](https://togithub.com/rectorphp/rector-src/pull/3878)) - Support attributes in `RemoveFinalFromEntityRector` ([#3727](https://togithub.com/rectorphp/rector-src/pull/3727)), Thanks [@alexndlm](https://togithub.com/alexndlm)! - Add `SwapMethodCallArgumentsRector` ([#3726](https://togithub.com/rectorphp/rector-src/pull/3726)), Thanks [@gaydamakha](https://togithub.com/gaydamakha)! - \[CodeQuality] Add `CleanupUnneededNullsafeOperatorRector` ([#3767](https://togithub.com/rectorphp/rector-src/pull/3767)) - Make `ReturnNeverTypeRector` work with type declaration, add it to PHP 8.1 set ([#3852](https://togithub.com/rectorphp/rector-src/pull/3852)) - \[TypeDeclaration] Add `BoolReturnTypeFromStrictScalarReturnsRector` ([#3898](https://togithub.com/rectorphp/rector-src/pull/3898)) - Make ChangeGlobalVariablesToPropertiesRector add properties directly, remove Nette inject methods ([#3957](https://togithub.com/rectorphp/rector-src/pull/3957)) - Utilize MinPhpVersionInterface in more rules ([#3752](https://togithub.com/rectorphp/rector-src/pull/3752)), Thanks [@staabm](https://togithub.com/staabm)! - Dump dependency container and re-use it - 35% faster test-suite ([#3809](https://togithub.com/rectorphp/rector-src/pull/3809)), Thanks [@staabm](https://togithub.com/staabm)! - Defer type-resolving in RemoveJustPropertyFetchRector ([#3761](https://togithub.com/rectorphp/rector-src/pull/3761)), Thanks [@staabm](https://togithub.com/staabm)!
#### Bugfixes :bug: - \[TypeDeclaration] Skip Arg unpack on AddMethodCallBasedStrictParamTypeRector ([#3787](https://togithub.com/rectorphp/rector-src/pull/3787)) - \[CodeQuality] Add typed property support to `IssetOnPropertyObjectToPropertyExistsRector` ([#3876](https://togithub.com/rectorphp/rector-src/pull/3876)) - \[CodeQuality] Skip non-array type on SimplifyForeachToArrayFilterRector ([#3738](https://togithub.com/rectorphp/rector-src/pull/3738)) - Fix ShortenedObjectType not resolving to correct class reflection ([#3397](https://togithub.com/rectorphp/rector-src/pull/3397)), Thanks [@jackbentley](https://togithub.com/jackbentley)! - Extend code-quality set ([#3773](https://togithub.com/rectorphp/rector-src/pull/3773)) - Don't neon-decode phpstan configs over and over again ([#3796](https://togithub.com/rectorphp/rector-src/pull/3796)), Thanks [@staabm](https://togithub.com/staabm)! - \[Console] Allow https url instead of git:// on SetupCICommand ([#3799](https://togithub.com/rectorphp/rector-src/pull/3799)) - Fix integer range phpdoc types being treated as useless ([#3825](https://togithub.com/rectorphp/rector-src/pull/3825)), Thanks [@jlherren](https://togithub.com/jlherren)! - Fix nullable param in ClassPropertyAssignToConstructorPromotionRector ([#3842](https://togithub.com/rectorphp/rector-src/pull/3842)) - Fix PrivatesAccessor: use selectFromArgs() instead ([#3923](https://togithub.com/rectorphp/rector-src/pull/3923)), Thanks [@staabm](https://togithub.com/staabm)!
#### Removed rules :skull: We've also remove bunch of rules, that were added in early days of Rector for demo purposes. They were not used as of any set for non-reliable cases. PHPStan and coding standards replace some of those. - \[CodeQuality] Remove ForToForeachRector, as overly deatiled and not reliable ([#3747](https://togithub.com/rectorphp/rector-src/pull/3747)) - \[CodeQuality] Remove SimplifyIfExactValueReturnValueRector, as overly defensive + InlineSimplePropertyAnnotationRector as purely coding standard area ([#3764](https://togithub.com/rectorphp/rector-src/pull/3764)) - \[CodingStyle] Remove RemoveDoubleUnderscoreInMethodNameRector, as naming is not handled for breaking reasons ([#3765](https://togithub.com/rectorphp/rector-src/pull/3765)) - Remove RemoveUnusedVariableAssignRector, as could be breaking code in order of excution and hard to do reliable ([#3793](https://togithub.com/rectorphp/rector-src/pull/3793)) - \[CodingStyle] Remove ConsistentPregDelimiterRector as not much practical, importance of regex is a testing it matches expectationg, area of static analysis ([#3797](https://togithub.com/rectorphp/rector-src/pull/3797)) - Remove ToStringToMethodCallRector as not practical and only for demo, FalseReturnClassMethodToNullableRector, as requires detailed custom refactoring ([#3854](https://togithub.com/rectorphp/rector-src/pull/3854)) - Remove ChangeOrIfReturnToEarlyReturnRector as makes code harder to read by duplication, rather use PHSPtan and extract method ([#3916](https://togithub.com/rectorphp/rector-src/pull/3916)) - \[DeadCode] Remove RemoveDuplicatedIfReturnRector as can lead to unexpeced consequences, better use static analysis and contextual handling ([#3926](https://togithub.com/rectorphp/rector-src/pull/3926)) - \[DeadCode] Remove RemoveDuplicatedInstanceOfRector as hardly practical ([#3936](https://togithub.com/rectorphp/rector-src/pull/3936)) - \[CodeQuality] Remove ExplicitMethodCallOverMagicGetSetRector designed for nette smart object migration only, not useful for general projects ([#3948](https://togithub.com/rectorphp/rector-src/pull/3948)) - Remove GetAndSetToMethodCallRector, as not practical and used for single legacy job ([#3953](https://togithub.com/rectorphp/rector-src/pull/3953)) - Remove ChangeReadOnlyVariableWithDefaultValueToConstantRector overly complex and risky, better job for PHPStan ([#3954](https://togithub.com/rectorphp/rector-src/pull/3954)) - Remove IsObjectOnIncompleteClassRector as blindly turns all incomplete checks to negated, better examine manually ([#3969](https://togithub.com/rectorphp/rector-src/pull/3969)) - Remove ReservedObjectRector as requires explicit configuration and is handled by RenameClassRector already ([#3975](https://togithub.com/rectorphp/rector-src/pull/3975)) - Remove ChangeReadOnlyPropertyWithDefaultValueToConstantRector as overly detailed checks, better use PHPStan and refactor individually ([#4028](https://togithub.com/rectorphp/rector-src/pull/4028)) - Remove NewToMethodCallRector as unused core and no other extension, niche to use, better handle by PHPStorm ([#4029](https://togithub.com/rectorphp/rector-src/pull/4029)) - \[CodingStyle] Remove AddFalseDefaultToBoolPropertyRector, as works with unrelaible docblocks ([#3856](https://togithub.com/rectorphp/rector-src/pull/3856)) - Remove UpdateFileNameByClassNameFileSystemRector niche rule that was added just for example sake ([#3849](https://togithub.com/rectorphp/rector-src/pull/3849)) - \[Transform] Remove ArgumentFuncCallToMethodCallRector as never used ([#3774](https://togithub.com/rectorphp/rector-src/pull/3774)) - \[Transform] Remove DimFetchAssignToMethodCallRector as unused ([#3775](https://togithub.com/rectorphp/rector-src/pull/3775)) - \[Transform] Remove FileGetContentsAndJsonDecodeToStaticCallRector as only for demo purposes ([#3776](https://togithub.com/rectorphp/rector-src/pull/3776)) - \[Transform] Remove MethodCallToAnotherMethodCallWithArgumentsRector as unused ([#3777](https://togithub.com/rectorphp/rector-src/pull/3777)) - \[CodeQuality] Remove SimplifyUselessLastVariableAssignRector as overly complex and should be handled individually ([#3784](https://togithub.com/rectorphp/rector-src/pull/3784)) - Remove AddPregQuoteDelimiterRector as very narrow area and has not context awareness, better handle manually ([#3927](https://togithub.com/rectorphp/rector-src/pull/3927)) - Remove TokenGetAllToObjectRector, as rare to use and leaky to handle, better handle in controller manual way ([#4001](https://togithub.com/rectorphp/rector-src/pull/4001)) - Remove ChangeReflectionTypeToStringToGetNameRector as niche and overly detailed, better refactor reflectio na as a whole ([#3976](https://togithub.com/rectorphp/rector-src/pull/3976)) - Remove RenameNamespaceRector, better handle by IDE or explicit RenameClassRector ([#3979](https://togithub.com/rectorphp/rector-src/pull/3979)) - \[CodeQuality] Deprecate NarrowUnionTypeDocRector as focused on docblocks, and moving to type declarations ([#3848](https://togithub.com/rectorphp/rector-src/pull/3848)) - Remove MakeTypedPropertyNullableIfCheckedRector as old fix of TypedPropertyRector rule, removed months ago ([#3851](https://togithub.com/rectorphp/rector-src/pull/3851)) - \[PHP 8.0] Deprecate old UnionTypesRector that is dangerously moving docblocks, use type declaration rules instead ([#3846](https://togithub.com/rectorphp/rector-src/pull/3846)) - \[CodingStyle] Remove OrderAttributesRector, as rather coding standard and does not have specific PSR example ([#3838](https://togithub.com/rectorphp/rector-src/pull/3838)) - Remove unused PregMatchTypeCorrector, the 3rd param in preg_match_\* is now handled natively by PHPStan ([#3824](https://togithub.com/rectorphp/rector-src/pull/3824)) - \[Restoration] Remove RemoveFinalFromEntityRector as used only to revert very old Rector bug ([#3847](https://togithub.com/rectorphp/rector-src/pull/3847)) ### [`v0.16.0`](https://togithub.com/rectorphp/rector/releases/tag/0.16.0): Released Rector 0.16.0 [Compare Source](https://togithub.com/rectorphp/rector/compare/0.15.25...0.16.0) #### New Features :partying_face: - \[TypeDeclaration] Add WhileNullableToInstanceofRector ([#3680](https://togithub.com/rectorphp/rector-src/pull/3680))
#### Bugfixes :bug: - Fix SingleInArrayToCompareRector if array item is variadic ([#3640](https://togithub.com/rectorphp/rector-src/pull/3640)), Thanks [@raoz](https://togithub.com/raoz)! - \[Php80] Handle crash leaveNode() returned invalid value of type integer on TokenGetAllToObjectRector ([#3644](https://togithub.com/rectorphp/rector-src/pull/3644)) - \[TypeDeclaration] Handle mix InlineHTML on FileWithoutNamespace ([#3648](https://togithub.com/rectorphp/rector-src/pull/3648)) - Simplify PhpFilesFinder ([#3649](https://togithub.com/rectorphp/rector-src/pull/3649)), Thanks [@staabm](https://togithub.com/staabm)! - \[Test] Rename fixture and refactor to solve random error ([#3677](https://togithub.com/rectorphp/rector-src/pull/3677)) - \[TypeDeclaration] Refactor UnionTypeMapper::narrowBoolType() to allow bool|int|false converted to bool|int ([#3685](https://togithub.com/rectorphp/rector-src/pull/3685)) - Update phpdoc-parser to ^1.20.3 ([#3691](https://togithub.com/rectorphp/rector-src/pull/3691)) - \[Privatization] Skip variable assign append on ChangeReadOnlyVariableWithDefaultValueToConstantRector ([#3687](https://togithub.com/rectorphp/rector-src/pull/3687)), Thanks [@mickeytodd](https://togithub.com/mickeytodd)! - \[NodeManipulator] clean up multiple instanceof check on AssignManipulator ([#3695](https://togithub.com/rectorphp/rector-src/pull/3695)) - \[CodeQuality] Using local variable $hasChanged on NarrowUnionTypeDocRector ([#3697](https://togithub.com/rectorphp/rector-src/pull/3697)) - Cache on successful file processing ([#3614](https://togithub.com/rectorphp/rector-src/pull/3614)), Thanks [@yguedidi](https://togithub.com/yguedidi)! - \[CodingStyle] Skip concat on first arg on ConsistentImplodeRector ([#3702](https://togithub.com/rectorphp/rector-src/pull/3702)), Thanks [@nerones](https://togithub.com/nerones)! - Fix ExplicitMethodCallOverMagicGetSetRector with a protected method ([#3732](https://togithub.com/rectorphp/rector-src/pull/3732)), Thanks [@pierredup](https://togithub.com/pierredup)! - \[TypeDeclaration] Handle infinite loop on array_reverse with index on AddMethodCallBasedStrictParamTypeRector on php8+ feature ([#3678](https://togithub.com/rectorphp/rector-src/pull/3678)) - \[TypeDeclaration] Handle regression multiple params no longer working on AddMethodCallBasedStrictParamTypeRector ([#3681](https://togithub.com/rectorphp/rector-src/pull/3681)) - \[TypeDeclaration] Add do { } while support on WhileNullableToInstanceofRector ([#3682](https://togithub.com/rectorphp/rector-src/pull/3682)) - \[Php56]\[Php70]\[Php74] Handle infinite loop on AddDefaultValueForUndefinedVariableRector+IfToSpaceshipRector+ClosureToArrowFunctionRector ([#3701](https://togithub.com/rectorphp/rector-src/pull/3701))
#### Performance Improvements :rocket: - \[Performance] Using findFirst() for cast to (bool) so no need search all found nodes ([#3642](https://togithub.com/rectorphp/rector-src/pull/3642)) - \[Performance] Using cheap chekc first on UndefinedVariableResolver::shouldSkipVariable() ([#3643](https://togithub.com/rectorphp/rector-src/pull/3643)) - \[CodeQuality] Improve SimplifyIfElseToTernaryRector performance ([#3721](https://togithub.com/rectorphp/rector-src/pull/3721)) - \[Renaming] Prevent overly greed type resolving in RenamePropertyRector ([#3700](https://togithub.com/rectorphp/rector-src/pull/3700)), Thanks [@staabm](https://togithub.com/staabm)! - Don't calculate diffs when `--no-diffs` is given ([#3710](https://togithub.com/rectorphp/rector-src/pull/3710)), Thanks [@staabm](https://togithub.com/staabm)! - Calculate diff only once per file after refactoring ([#3711](https://togithub.com/rectorphp/rector-src/pull/3711)), Thanks [@staabm](https://togithub.com/staabm)! - Improve PropertyFetchAnalyzer performance ([#3654](https://togithub.com/rectorphp/rector-src/pull/3654)), Thanks [@staabm](https://togithub.com/staabm)! - Improve LocalMethodCallFinder performance ([#3651](https://togithub.com/rectorphp/rector-src/pull/3651)), Thanks [@staabm](https://togithub.com/staabm)! - Improve LocalConstantFinder performance ([#3652](https://togithub.com/rectorphp/rector-src/pull/3652)), Thanks [@staabm](https://togithub.com/staabm)! - Improve NodeComparator performance ([#3659](https://togithub.com/rectorphp/rector-src/pull/3659)), Thanks [@staabm](https://togithub.com/staabm)! - Improve ReflectionResolver performance ([#3658](https://togithub.com/rectorphp/rector-src/pull/3658)), Thanks [@staabm](https://togithub.com/staabm)!
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.