Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency rector/rector to ^0.19.0 #238

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 17, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
rector/rector (source) ^0.17.0 -> ^0.19.0 age adoption passing confidence

Release Notes

rectorphp/rector (rector/rector)

v0.19.0

Compare Source

v0.18.13: Released Rector 0.18.13

Compare Source

New Features 🥳

  • [DeadCode] Add Function_ support on RemoveUselessReturnTagRector (#​5325)
  • [TypeDeclaration] Add MergeDateTimePropertyTypeDeclarationRector (#​5327)
  • [DeadCode] Add Function_ support on RemoveUselessParamTagRector (#​5331)
  • [DeadCode] Add RemoveNullTagValueNodeRector (#​5352)

Bugfixes 🐛

  • [Php83] Fix const from applying incorrect types (#​5326), Thanks @​peterfox!
  • [TypeDeclaration] Fix missing change type to DateTimeInterface on MergeDateTimePropertyTypeDeclarationRector (#​5329)
  • [TypeDeclaration] Handle DateTimeInterface from use statement on MergeDateTimePropertyTypeDeclarationRector (#​5330)
  • [TypeDeclaration] Handle assign $this on TypedPropertyFromAssignsRector (#​5333)
  • Fix array type if property is used in TypedPropertyFromStrictConstructorRector (#​5339)
  • [Naming] Skip DateTimeImmutable on RenamePropertyToMatchTypeRector (#​5340)
  • [PHP 7.4] Skip typed properties in the set, as standalone set now available (#​5342)
  • [TypeDeclaration] Skip has child return different type on ReturnNeverTypeRector (#​5343)
  • [Experiment][TypeDeclaration] Allow change abstract class methods with body on ReturnType*Rector (#​5344)
  • [Php55] Make StringClassNameToClassConstantRector configurable to keep first pre-backslash string configurable (#​5354)
  • [TypeDeclaration] Skip casted to (array) on StrictArrayParamDimFetchRector (#​5356)
  • [TypeDeclaration] Return new static from different object on ReturnTypeFromStrictTypedCallRector (#​5357)
  • [TypeDeclaration] Allow return static from under function on ReturnTypeFromStrictTypedCallRector (#​5358)
  • [Naming] Skip $this in RenameForeachValueVariableToMatchExprVariableRector (#​5360), Thanks @​sreichel!
  • [Transform] Do not create a new node if the existing node is already the correct one on AttributeKeyToClassConstFetchRector (#​5328), Thanks @​SerethiX!
  • Bump to php parser 4.18 (#​5362)
  • [CodeQuality] Skip Superglobals variable on SimplifyEmptyCheckOnEmptyArrayRector (#​5369)
  • [Php55] Handle crash after exit() on GetCalledClassToSelfClassRector (#​5372)
  • [CodeQuality] Skip method call on else on TernaryFalseExpressionToIfRector (#​5373)
  • Remove return type in case of never in RemoveUselessReturnTagRector (#​5323), Thanks @​staabm!
  • [DeadCode] Remove unused @​return mixed on RemoveUselessReturnTagRector (#​5332)
  • [DeadCode] Skip has parent class with __call() magic method on RemoveParentCallWithoutParentRector (#​5336)
  • [PHP 5.5] Remove extra preslash in class reference, as in practice removal manually (#​5338)
  • [DeadCode] Remove null as never used param type in RemoveUselessParamTagRector (#​5348)
  • Remove json throw on error rule from PHP 7.3 set, as changed behavior and must be applied on purpose (#​5349)
  • [Testing] Remove unnecessary set Parameter Source on TestingParser (#​5371)

v0.18.12: Released Rector 0.18.12

Compare Source

New Features 🥳

  • [CodeQuality] Add RemoveUselessIsObjectCheckRector (#​5316)
  • [PHP83] Implements a rule to add types to class constants (#​5290), Thanks @​peterfox!

Bugfixes 🐛

  • [TypeDeclaration] Skip iterable already there in AddReturnTypeDeclarationFromYieldsRector (#​5291)
  • [TypeDeclaration] Remove ParamTypeFromStrictTypedPropertyRector as seems similar feature with AddParamTypeFromPropertyTypeRector (#​5293)
  • [CodingStyle] Remove AddArrayDefaultToArrayPropertyRector as based on docblock types and public contract, better use type declaration set instad (#​5298)
  • [TypeDeclaration] Skip return void in abstract empty class in AddVoidReturnTypeWhereNoReturnRector (#​5311)
  • [Php80] Skip PDO::query() on AddParamBasedOnParentClassMethodRector (#​5313)
  • [TypeDeclaration] Add If else assign support on TypedPropertyFromAssignsRector (#​5314)
  • [CodeQuality] Make CommonNotEqualRector skip if not <> (#​5292)
  • [Naming] Skip singularize "cms" on RenameForeachValueVariableToMatchExprVariableRector (#​5294)
  • [TypeDeclaration][Performance] Check typed param already early on ParamTypeByMethodCallTypeRector (#​5295)
  • [Strict] Fix DisallowedEmptyRuleFixerRector empty() allow string '0' check (#​5296)
  • [EarlyReturn] Skip duplicating complex expression in ChangeAndIfToEarlyReturnRector (#​5301)
  • [Scoped] Exclude symfony/console/Debug/CliRequest.php from parallel-lint PHP 7.2 syntax check (#​5304)
  • Skip RenameMethodRector in never (#​5305), Thanks @​staabm!
  • [CodeQuality] Skip with else on SimplifyForeachToCoalescingRector (#​5307)
  • [Doc] Typo fix on sample code documentation on SimplifyForeachToCoalescingRector (#​5308)
  • [Privatization] Skip call non-private method on non-final class on PrivatizeLocalGetterToPropertyRector (#​5309)
  • [Privatization] Fix first class callable in PrivatizeLocalGetterToPropertyRector (#​5310)
  • [TypeDeclaration] Keep constant false return type from strict native call (#​5223), Thanks @​tomi85!
  • [PHP 7.0] Skip mt_rand() replacement as not valuable (#​5315)
  • [Strict] Allow check '0' empty zero on BooleanInTernaryOperatorRuleFixerRector on string type (#​5297)
  • Fix annotation to attribute parsing string (#​5317)
  • [Instanceof] Fix combination of dead instance and compare (#​5319)
  • Remove isPositiveInteger() check for third argument to strpos() (#​5257), Thanks @​ikari7789!
  • Remove return type in case of void in RemoveUselessReturnTagRector (#​5318)
  • [DeadCode] Skip @​return never with void on RemoveUselessReturnTagRector (#​5320)
  • [DeadCode] Remove useless nullable @​return doc on RemoveUselessReturnTagRector (#​5321)

v0.18.11: Released Rector 0.18.11

Compare Source

Bugfixes 🐛

  • [DeadCode] Skip multi no stmts on RemoveDuplicatedCaseInSwitchRector (#​5258)
  • [Performance][Renaming] Remove unnecessary array_reverse() on RenameClassRector (#​5266)
  • [TypeDeclaration] Skip default not array type on StrictArrayParamDimFetchRector (#​5259)
  • [TypeDeclaration] Skip echo-ed on StrictArrayParamDimFetchRector (#​5260)
  • [Php71] Skip re-assigned as array on AssignArrayToStringRector (#​5261)
  • [Php71] Ensure re-assign after definition on AssignArrayToStringRector (#​5262)
  • [Renaming] Handle Rename no namespace to namespaced class with existing use statements (#​5264)
  • [Renaming][Performance] Re-structure check namespace only on renamed node got Namespace_ (#​5265)
  • [Php81] Skip increment/decrement on ReadOnlyPropertyRector (#​5267)
  • [TypeDeclaration] Deprecate TypedPropertyFromStrictGetterMethodReturnTypeRector as depends on missing context and creates invalid code (#​5269)
  • [AutoImport] Fixing auto import on multiple @​\ usage (#​5271)
  • [Performance][Renaming] Use FullyQualified on RenameClassRector (#​5272)
  • [AutoImport] Handle complex usage of multiple @​\ combined with other doc (#​5273)
  • [AutoImport] Handle multi @​\ usage on multiline description (#​5274)
  • [Php80] Handle FQCN @​\ usage on AnnotationToAttributeRector (#​5240)
  • [BetterPhpDocParser] Handle nested doctrine annotation with single quote content (#​5281)
  • [Privatization] Skip method with parent call (#​5283)
  • [BetterPhpDocParser] Use ORIG_NODE attribute on DoctrineAnnotationDecorator on handle @​\ after generic (#​5285)
  • [Php80] Allow subnamespace from use statements support on AnnotationToAttributeRector (#​5287)

Removed 💀

  • Remove deprecated Rector rules (#​5270)

v0.18.10: Released Rector 0.18.10

Compare Source

Bugfixes 🐛

  • [Renaming] FQN-ize namespaced import no namespace -> namespaced name on RenameClassRector (#​5256)

v0.18.9: Released Rector 0.18.9

Compare Source

New Features 🥳

  • [DeadCode]: Support functions in RemoveUnusedVariableAssignRector (#​5249
  • [Performance][PostRector] Only process FullyQualified on import Node name on NameImportingPostRector (#​5255)

Bugfixes 🐛

  • [AutoImport][Php70] Keep FQCN on conflict last name on TernaryToNullCoalescingRector (#​5251)
  • [Naming] Fix dotted name on generics bug in RenameVariableToMatchMethodCallReturnTypeRector (#​5250)
  • [Php73] Handle crash on JsonThrowOnErrorRector + SensitiveConstantNameRector (#​5253)
  • [CodingStyle] Refactor UseImportsAdder to return [FileWithoutNamespace] code on no namespaced code (#​5254)

v0.18.8: Released Rector 0.18.8

Compare Source

Bugfixes 🐛

  • Bump to reactphp/event-loop ^1.5 (#​5246)
  • [AutoImport] Skip auto import on no namespace used class on auto import enabled (#​5247)
  • [AutoImport][Renaming] Handle same last name no namespace just renamed auto import (#​5248)

v0.18.7: Released Rector 0.18.7

Compare Source

New Features 🥳

  • [CodeQuality] Add negated support on SingleInArrayToCompareRector (#​5205)
  • [Php83] Adds rule for adding Override attribute (#​5170), Thanks @​peterfox!

Bugfixes 🐛

  • BinaryOpBetweenNumberAndStringRector don't trust phpdoc (#​5199), Thanks @​staabm!
  • [CodeQuality][Php70] Handle LocallyCalledStaticMethodToNonStaticRector + ThisCallOnStaticMethodToStaticCallRector must change both method and caller (#​5196)
  • CountArrayToEmptyArrayComparisonRector: don't trust phpdoc (#​5203), Thanks @​staabm!
  • [TypeDeclaration] Skip union false on NumericReturnTypeFromStrictScalarReturnsRector (#​5204)
  • [CodeQuality] Handle negated isset on IssetOnPropertyObjectToPropertyExistsRector on property not exists (#​5206)
  • [CodeQuality] Handle crash no scope on ThrowWithPreviousExceptionRector+OptionalParametersAfterRequiredRector (#​5207)
  • [NodeTypeResolver] Clean up TryCatch_ Scope filling (#​5208)
  • [PHPStanStaticTypeMapper] Clean up tweak false and bool check on UnionTypeMapper (#​5209)
  • [TypeDeclaration] Skip default numeric string on param int on ParamTypeByMethodCallTypeRector (#​5210)
  • [AutoImport] Handle AnnotationToAttributeRector + RenameClassRector then enable auto import (#​5213)
  • [Php80] Keep single quoted Argument Attribute on AnnotationToAttributeRector (#​5214)
  • [Php80] Keep single quoted key: 'value' on AnnotationToAttributeRector (#​5215)
  • [AutoImport] Ensure change to FullyQualified for Attribute on just changed from annotation (#​5216)
  • [Php52][Php70] Handle ContinueToBreakInSwitchRector + BreakNotInLoopOrSwitchToReturnRector (#​5217)
  • [Php80] Handle RenameClassRector+AnnotationToAttributeRector with auto import and existing attribute defined (#​5219)
  • [Testing] In case of failed test using multiple rules, show applied Rector rules to make easy to find them (#​5222)
  • [NodeTypeResolver] Handle nullable extended class on ->isObjectType() on DowngradeReflectionGetAttributesRector (#​5224)
  • NullableCompareToNullRector: Don't trust phpdocs (#​5225), Thanks @​staabm!
  • [CodingStyle] Move ArraySpreadInsteadOfArrayMergeRector from php74 to codingstyle sets list (#​5230)
  • [PostRector] Ensure old classes in use statements cleaned up after rename attribuet on ClassRenamingPostRector (#​5231)
  • RestoreDefaultNullToNullableTypePropertyRector: skip @readonly phpdoc (#​5233), Thanks @​staabm!
  • [AutoImport] Handle DeclareStrictTypesRector on importNames() enabled on no namespace (#​5241)
  • [AutoImport] Allow auto import just renamed @​var only docblock on RenameClassRector without removeUnusedImports() enabled (#​5220)
  • Remove rule DataProviderArrayItemsNewlinedRector.php (#​5227), Thanks @​eerison!
  • Remove ArraySpreadInsteadOfArrayMergeRector from LevelSetList::UP_TO_PHP_74 (#​5228), Thanks @​staabm!
  • [DeadCode] Allow indirect duplicated grouping on RemoveDuplicatedCaseInSwitchRector (#​5234)
  • [DeadCode] Reduce double loop on RemoveDuplicatedCaseInSwitchRector (#​5235)
  • [DeadCode] Handle different indirect duplicated on RemoveDuplicatedCaseInSwitchRector (#​5236)
  • [DeadCode] Ensure change hasChanged flag on RemoveDuplicatedCaseInSwitchRector (#​5237)
  • [DeadCode] Handle repetitive jump equal case stmts on RemoveDuplicatedCaseInSwitchRector (#​5239)
  • Rename parameter variable to nextCase on RemoveDuplicatedCaseInSwitchRector (#​5244)

v0.18.6: Released Rector 0.18.6

Compare Source

New Features and Changes 🥳
  • [CodeQuality] Add CompleteMissingIfElseBracketRector (#​5121)
  • [CodeQuality] Add Else and ElseIf on CompleteMissingIfElseBracketRector (#​5124)
  • [TypeDeclaration] Utilize ClassMethodReturnTypeOverrideGuard on AddReturnTypeDeclarationFromYieldsRector (#​5156)
  • [DeadCode] Add RemoveUselessReturnExprInConstructRector (#​5158)
  • Improve UnaryPlus and UnaryMinus support in isDynamicExpr (#​5177), Thanks @​JulianCBC!

Bugfixes 🐛
  • [CodeQuality] Skip VB style if endif on CompleteMissingIfElseBracketRector (#​5122)
  • [CodeQuality] Skip direct InlineHTML on CompleteMissingIfElseBracketRector (#​5125)
  • [CodeQuality] Skip spaced elseif cond on CompleteMissingIfElseBracketRector (#​5126)
  • [CodeQuality] Only check start from current Stmt token pos up until open parentheses on CompleteMissingIfElseBracketRector (#​5127)
  • [CodeQuality] Handle all if,elseif,else no bracket on CompleteMissingIfElseBracketRector (#​5129)
  • [CodeQuality] Skip VB style in complex HTML on CompleteMissingIfElseBracketRector (#​5132)
  • Skip __construct() in BoolReturnTypeFromStrictScalarReturnsRector (#​5133), Thanks @​staabm!
  • [CodeQuality] Handle missing bracket on If only on CompleteMissingIfElseBracketRector (#​5134)
  • [CodeQuality] Handle on closure, anonymous function, method call on CompleteMissingIfElseBracketRector (#​5135)
  • [CodeQuality] Use its start token pos on Else_ on CompleteMissingIfElseBracketRector as no cond (#​5136)
  • [PhpParser] Reduce AstResolver complexity by move check fileName is null to parseFileNameToDecoratedNodes() (#​5138)
  • [TypeDeclaration] Handle Union with array type on ReturnUnionTypeRector (#​5144)
  • [TypeDeclaration] Handle union A extends B on ReturnUnionTypeRector (#​5149)
  • [CodeQuality] Fix missing parentheses on CombineIfRector (#​5151)
  • [TypeDeclaration] Utilize ClassMethodReturnTypeOverrideGuard on NumericReturnTypeFromStrictScalarReturnsRector (#​5155)
  • [CodeQuality] Handle negative and positive int/float on InlineConstructorDefaultToPropertyRector (#​5159)
  • [CodeQuality] Skip docblock usage on SimplifyBoolIdenticalTrueRector (#​5161)
  • [CodeQuality] Skip magic property fetch on IssetOnPropertyObjectToPropertyExistsRector (#​5163)
  • [PostRector] Reduce loop on ClassRenamingPostRector (#​5174)
  • [PostRector] Fix ClassRenamingPostRector return when no auto import replacement (#​5175)
  • [Renaming] Skip nullable object object|null on RenameMethodRector (#​5181)
  • [Downgradephp81][DowngradePhp80] Handle No scope crash on DowngradeSetAccessibleReflectionPropertyRector + DowngradeMatchToSwitchRector (#​5183)
  • [Naming] Skip DateTime from renaming, to keep convention of named dates (#​5184)
  • Skip new self in RenameVariableToMatchNewTypeRector (#​5185)
  • Skip DateTime in ExpectedNameResolver (#​5186)
  • [Naming] Skip all kinds of generators (#​5187)
  • [Renaming] Skip pointless names in RenameForeachValueVariableToMatchMethodCallReturnTypeRector (#​5188)
  • [Php70] Fix Php4 contructor not replaced with __construct() on php 7.4 environment (#​5189)
  • [Php74][Php81] Allow mixed key on ArraySpreadInsteadOfArrayMergeRector on php 8.1 version feature enabled (#​5190)
  • [TypeDeclaration] Handle skipped by file path on DeclareStrictTypesRector due to use beforeTraverse() (#​5191)
  • Fix phpstan notice $phpVersion on Rector\Config\RectorConfig::phpVersion() (#​5193)
  • [PHPStanStaticTypeMapper] Remove BoolUnionTypeAnalyzer on UnionTypeMapper (#​5141)
  • [DeadCode] Remove UnionType check on RecastingRemovalRector (#​5142)
  • Remove src/constants.php for T_ENUM and T_NAME_RELATIVE (#​5143)
  • [PHPStanStaticTypeMapper] Remove narrow string and int on UnionTypeMapper (#​5145)
  • [PHPStanStaticTypeMapper] Remove matchArrayTypes() on UnionTypeMapper (#​5146)
  • [DeadCode] Skip indirect variable definition on RemoveNonExistingVarAnnotationRector (#​5152)
  • [DeadCode] Skip key used in next stmt on RemoveUnusedForeachKeyRector (#​5153)
  • [DeadCode] Skip used in next For_/Foreach_ on RemoveDeadIfForeachForRector (#​5154)
  • [DeadCode] Handle file_get_contents() only remove variable on RemoveUnusedVariableAssignRector (#​5162)
  • [DeadCode] Skip count() on mixed on RemoveUnusedNonEmptyArrayBeforeForeachRector (#​5160)
  • RemoveUnusedNonEmptyArrayBeforeForeachRector: ignore phpdoc types (#​5169), Thanks @​staabm!
  • RemoveUnusedNonEmptyArrayBeforeForeachRector: skip array dim fetch (#​5166), Thanks @​staabm!
  • [DeadCode] Skip return false pseudo type in union on RemoveUselessReturnTagRector (#​5172)
  • [AutoImport] [Renaming] Skip remove used use statement on annotation during rename + auto import when no replacement on auto import (#​5168)
  • [DeadCode] Mirror comment on assign method call on RemoveUnusedVariableAssignRector (#​5195)

v0.18.5: Released Rector 0.18.5

Compare Source

New Features and Improvements 🥳

  • [build] Remove duplicated phpstan/phpstan from the build, as require by build package in composer.json already (rectorphp/rector-src@51ed7b6)
  • AddParamTypeBasedOnPHPUnitDataProviderRector: Check all data providers (#​5068), Thanks @​jlherren!
  • AddParamTypeBasedOnPHPUnitDataProviderRector: Enhance existing rule to handle PHPUnit 10+ DataProvider Attribute (#​4925), Thanks @​mcampbell508!
  • make PhpDocInfo::findByAnnotationClass() public to use in Symfony rules (#​5103)

Bugfixes 🐛

  • Feature/fix class annotation bad print (#​5081), Thanks @​etshy!
  • [Performance] Avoid ReflectionProvider check function exists on NameImportingPostRector (#​5083)
  • InlineConstructorDefaultToPropertyRector Readonly Class (#​5085), Thanks @​beschoenen!
  • [CodeQuality] Handle crash on variable variable on assign closure on OptionalParametersAfterRequiredRector (#​5089)
  • [NodeTypeResolver] Use isScalar()->yes() usage on StaticTypeAnalyzer and ScalarTypeComparator services (#​5099)
  • [ProcessAnalyzer] Ensure instanceof Stmt on check infinite loop on not yet has "created_by_rule" attribute (#​5100)
  • [DX] Rename shouldImportName() to shouldSkipName() on ClassNameImportSkipper (#​5107)
  • The ReturnTypeFromReturnNewRector must only handle new instances, to avoid leaking to everything (#​5115)
  • [Php80] Skip when already implements Stringable and has string return type on StringableForToStringRector (#​5120)

Removed and Deprecated 💀

  • [DX] Remove CurrentFileProvider dependency on ChangedNodeScopeRefresher (#​5087)
  • [DX] Remove DependencyClassMethodDecorator as not used anymore due to paralel nature (#​5094)
  • [PostRector] Remove CurrentFileProvider on PostFileProcessor (#​5097)
  • [Comments] Remove unused copy Node object on CommentRemover (#​5103)
  • [Performance][AutoImport] Remove just renamed check on ClassNameImportSkipper (#​5106)
  • Deprecate CountOnNullRector as depends on previous context and require manual adjustment of previous result (#​5101)

v0.18.4: Released Rector 0.18.4

Compare Source

New Features and Improvements 🥳

  • Introducing Collectors 🥳 - processing collected data + test case (#​4970)
  • Run tests on macos (#​5019), Thanks @​staabm!
  • Move betterNodeFinder, valueResolver, phpDocInfoFactory dependencies from AbstractRector into rules (#​5071)
  • DX: Validate paths in RectorConfig->paths() (#​5065), Thanks @​staabm!
  • [DX] Make PhpDocInfoFactory explicitly required in Rector rule constructor, if needed (#​5051)
  • [DX] Make ValueResolver explicitly required in Rector rules constructor if needed (#​5052)

Bugfixes 🐛

  • [DeadCode] RemoveDeadZeroAndOneOperationRector should not remove Constants (#​4910), Thanks @​TwanVermeulen!
  • [PostRector] Fix unused import not removed on empty generic class name exists (#​5012)
  • [Parallel] Handle Spaced root project main script on parallel process (#​4813)
  • Fix TypedPropertyFromStrictConstructor* order (#​5021), Thanks @​staabm!
  • [DX] Lower current node dependency - pass it directly to doc node parsing (#​5023)
  • [AutoImport] Fix conflict current namespace auto import (#​5024)
  • Simplify UseIdenticalOverEqualWithSameTypeRector (#​5029), Thanks @​staabm!
  • [Performance][Testing] Use str_contains instead of regex in FixtureSplitter (#​5030)
  • Fix ArrayKeyFirstLastRector: Skip exection when pointer is changed (#​5038), Thanks @​scyzoryck!
  • [TypeDeclaration] Handle fallback from param same type object on ReturnTypeFromReturnNewRector (#​5039)
  • [NodeTypeResolver] Use Scope->getType() on ArrayDimFetch on NodeTypeResolver::getNativeType() (#​5037)
  • [NodeTypeResolver] pull getType() on ArrayDimFetch when not mixed type from its variable native definition (#​5056)
  • [CodingStyle][EarlyReturn] Fix infinite if else on BinarySwitchToIfElseRector+RemoveAlwaysElseRector (#​5057)
  • [TypeDeclaration] Skip ArrayDimFetch for return and param types (#​5059), Thanks @​staabm!
  • [NodeTypeResolver] Handle optional array shape on native function like with ArrayDimFetch (#​5062)
  • [Php80] Mirror switch comment to match to ChangeSwitchToMatchRector (#​5072)
  • [AutoImport] Skip case insensitive conflict defined class name on $rectorConfig->importNames() (#​5076)
  • Docblock fix on ShortNameResolver (#​5077)
  • [TypeDeclaration] Add return static property support on ReturnTypeFromStrictTypedPropertyRector (#​5050)

Removed and Deprecated 💀

  • [Config] Remove asterisk support in import() for file, use explicit paths instead (#​5010)
  • [Performance] Remove regex check on open tag spaced check on FileProcessor (#​5073)
  • Deprecate TypedPropertyFromStrictConstructorReadonlyClassRector as based on docblock and public elements; use private elements and property promotion instead (#​5049)
  • Deprecate BinarySwitchToIfElseRector as opinionated to allow more suitable match() refactoring (#​5064)

v0.18.3: Released Rector 0.18.3

Compare Source

New Features and Changes 🥳

  • [BC] docblock changes in custom Rector rules now have to be reprinted directly in the rule -https://github.com/rectorphp/rector/issues/8201#issue-18941480955
  • [TypeDeclaration] Add return empty string defined support on ReturnTypeFromStrictScalarReturnExprRector (#​4919)
  • [TypeDeclaration] Add fallback return direct array support on ReturnTypeFromStrictNewArrayRector (#​4928)
  • [TypeDeclaration] Add init assign method call support on ReturnTypeFromStrictNewArrayRector (#​4929)
  • [TypeDeclaration] Ensure ArrayType on ReturnTypeFromStrictNewArrayRector::shouldAddReturnArrayDocType() (#​4932)
  • [TypeDeclaration] Add test fixture return docblock on init method call assign as skipped on ReturnTypeFromStrictNewArrayRector (#​4933)
  • [TypeDeclaration] Add non native function return support on ReturnTypeFromStrictScalarReturnExprRector (#​4934)
  • BC: Separated regex matching in NodeNameResolver->isName() (#​4951), Thanks @​staabm!
  • Add support for Custom Skip Voters (#​5002), Thanks @​kaczenski!
  • Implement a max jobs per worker budget (#​4965), Thanks @​staabm!
  • Prevent unnecessary calls to spl_object_id() (#​4992), Thanks @​staabm!
  • Refactor use import resolving (#​4998), Thanks @​staabm!
  • NodeNameResolver: Throw exception in BC breaking path (#​4980), Thanks @​staabm!
  • [Internals] Decouple output from AbstractRector, narrow debugging output to file path (#​4976)
  • Update docblock only when changed, directly in rector rule (#​4986)

Bugfixes 🐛

  • AddVoidReturnTypeWhereNoReturnRector: fix never type handling (#​4918), Thanks @​staabm!
  • [TypeDeclaration] Skip return after return closure on AddVoidReturnTypeWhereNoReturnRector (#​4930)
  • [TypeDeclaration] Use $type->isScalar()->yes() on AlwaysStrictScalarExprAnalyzer (#​4920)
  • Refactor BetterNodeFinder::findFirstInFunctionLikeScoped() to work with SilentVoidResolver (#​4931)
  • [NodeTypeResolver] Handle isObjectType() on new $class dynamic variable should return false compare to Object FQCN (#​4936)
  • [Testing] Fix running unit test on macOS (#​4941)
  • Faster name resolving (#​4955), Thanks @​staabm!
  • UseImportsTraverser: don't deep traverse (#​4994), Thanks @​staabm!
  • [tests] Replace wildcard e2e test with unit one (#​5000)
  • [DocBlock] Update docblock contents right in the rule (#​4999)
  • [PhpParser] Fix crash read jetbrains/phpstorm-stubs included in phpstan.phar on PHP 8.0 and PHP 7.4 (#​5001)
  • RenameFunctionRector: prevent repeated isName() calls (#​5003), Thanks @​staabm!
  • Make PhpDocINfo::removeByType() return bool to inform about changed node (#​4979)

Removed 💀

  • [cleanup] Remove deprecated NonPhpRectorInterface, PseudoNamespaceToNamespaceRector and mysql to mysqli sets (#​4927)
  • Remove UnSpreadOperatorRector as not clear value and spread used on purpose (#​4949)
  • [Naming] Remove matchesStringName() check completely from NodeNameResolver, including endsWith() method - use getName() and compare directly instead (#​4954)
  • [Performance][Php55] Remove regex replace e on RegexMatcher (#​4974)
  • Remove CurrentRectorProvider and used for docblock changes report, return bool value and node directly in the rector rule instead (#​4982)
  • Deprecated PhpDocInfo::markAsChanged() to ensure doc block is changed directly in the Rector rule (#​4987)

v0.18.2: Released Rector 0.18.2

Compare Source

New Features and Changes 🥳

  • Add MyCLabs enum equals + keeping methods (#​4645), Thanks @​K0nias!
  • [TypeDeclaration] skip variadic constructor param of mixed type on AddParamTypeFromPropertyTypeRector (#​4887), Thanks @​Celebrate-Reinhard!
  • [TypeDeclaration] Do not add default value when assigned in __construct() on TypedPropertyFromStrictGetterMethodReturnTypeRector (#​4886)
  • [TypeDeclaration] Add ReturnTypeFromStrictFluentReturnRector (#​4890)
  • Add single value concat support to EncapsedStringsToSprintfRector (#​4897)
  • Add number support to concat EncapsedStringsToSprintfRector (#​4898)
  • [DeadCode] Remove @​return void on return self on RemoveUselessReturnTagRector (#​4894)
  • Add test case for caching $rectorConfig->rules() changed (#​4903)
  • [CodeQuality] Add NumberCompareToMaxFuncCallRector (#​4914)
  • [TypeDeclaration] Add return self object support on ReturnTypeFromStrictFluentReturnRector (#​4915)
  • [TypeDeclaration] Add return static object support on ReturnTypeFromStrictFluentReturnRector (#​4916)

Bugfixes 🐛

  • [Caching] Add VersionResolver::PACKAGE_VERSION to FileHashComputer::compute() so cache cleared on composer update got new version (#​4904)
  • [TypeDeclaration] Using ClassMethodReturnTypeOverrideGuard on ReturnTypeFromStrictParamRector (#​4878)
  • [e2e] $rectorConfig->skip() should not skip inside different path over config (#​4882)
  • Fix missing default string in TypedPropertyFromStrictGetterMethodReturnTypeRector (#​4885)
  • Fix tests fixture updater (#​4892)
  • Fix union type check of object (#​4893)
  • Simplify isMatchingUnionType() (#​4895), Thanks @​staabm!
  • Skip identical to false in SimplifyBoolIdenticalTrueRector, as exact comparison is stronger than negated expression (#​4901)
  • Fix Rector invalidation in case of changes sets or rules (#​4902)
  • [TypeDeclaration] Skip mixing native + docblock union assign on TypedPropertyFromAssignsRector (#​4905)
  • StrictArrayParamDimFetchRector: Skip objects (#​4907), Thanks @​staabm!
  • FamilyRelationsAnalyzer: final classes can't have children (#​4913), Thanks @​staabm!
  • [Config] Remove $isBound usage as cause empty configuration on RectorConfig (#​4880)

v0.18.1: Released Rector 0.18.1

Compare Source

This release is accompanied by 2 posts that explains behind the scenes context:


New Features and Changes 🥳

  • [CI] Narrow tests to single job, as now takes 20 s 🚀 (#​4827)
  • [Config] Handle $rectorConfig->import() with wildcards * config (#​4832)
  • [DX] Display rule count in list-rules (#​4848)
  • Skip PHPDoc return type in AddReturnTypeDeclarationBasedOnParentClassMethodRector (#​4809), Thanks @​staabm!
  • AddReturnTypeDeclarationBasedOnParentClassMethodRector: don't trust phpdoc types (#​4810), Thanks @​staabm!
  • [DX] Add optional testdox/pest like output to get exact test metrics per unit test fixture (#​4821)
  • [TypeDeclaration] Add new array replaced with array on ReturnTypeFromStrictNewArrayRector (#​4825)
  • [DX] Merge PhpRectorInterface to RectorInterface as identical contract and separation no longer needed (#​4812)
  • [PHPStan] Avoid removing bleeding edge from phar include, let user handle own phpstan configuration (#​4840)

Bugfixes 🐛

  • [Php73][Php80] Handle empty long array syntax default value on SensitiveConstantNameRector+AddParamBasedOnParentClassMethodRector (#​4837)
  • [Config] Add merging of rules configuration, call configure() just once (#​4838)
  • Fix RenamePropertyToMatchTypeRector to skip Laravel collections and avoid accident rename (#​4811)
  • [BetterPhpDocParser] Enable textBetweenTagsBelongsToDescription on BetterPhpDocParser extends PhpDocParser (#​4817)
  • [PHPUnit] Fix extreemely slow PHPUnit run on data providers with objects (#​4823)
  • [AutoImport] Handle case insensitive name collide on auto import (#​4829)
  • [Traverser] Set explicitely nodeConnectingVisitorCompatibility: false config in config/phpstan/static-reflection.neon (#​4841)
  • replaces get_headers $associative with bool (#​4850), Thanks @​mvhirsch!
  • [Php55][Renaming] Handle rename string on combination StringClassNameToClassConstantRector+RenameStringRector (#​4869)
  • [Php80] Handle crash parent default empty array/string param on AddParamBasedOnParentClassMethodRector (#​4833)

Removed 💀

  • Remove deprecated FileProcessorInterface (#​4835)
  • Remove SwapFuncCallArgumentsRector as keeps swaping to infinity, use custom rule instead (#​4874)

v0.18.0: Released Rector 0.18.0 with Laravel container ⚡️

Compare Source

New Features and Changes 🥳

  • [DI] Switch container to Laravel - final step 🥳 (#​4698)
    • do you use $rectorConfig->import('src/*'); with mask?
    • this is removed now, use explicit real paths instead
  • [DI] Remove symfony/dependency-injection dependency (#​4796)
  • [DI] Add symfony config BC warnings layer, to inform about an upgrade (#​4800)
  • Add possibility to add multiple phpstan configs (#​4798), Thanks @​alexander-schranz!
  • [DX] Make use of addParameter() (#​4801)
  • Add deprecation warning for FileProcessorInterface (#​4808)

Bugfixes 🐛

  • [DeadCode] Handle duplicated annotation on space before close parentheses on RemoveUselessParamTagRector (#​4795)
  • Fix skip() Rector class, make container forget it comleteely (#​4807)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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 has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot enabled auto-merge (squash) August 17, 2023 16:31
@renovate renovate bot force-pushed the renovate/rector-rector-0.x branch from 66dedbc to b0b2d26 Compare January 9, 2024 04:06
@renovate renovate bot changed the title Update dependency rector/rector to ^0.18.0 Update dependency rector/rector to ^0.19.0 Jan 9, 2024
@qdequippe qdequippe closed this Feb 4, 2024
auto-merge was automatically disabled February 4, 2024 14:50

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant