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 v1 #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 6, 2024

Mend Renovate

This PR contains the following updates:

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

Release Notes

rectorphp/rector (rector/rector)

v1.2.1: Released Rector 1.2.1

Compare Source

New Features 🥳

  • [type-declarations] Add ReturnNullableTypeRector (#​6110)
  • [type-declarations] Add StringsReturnTypeFromStrictScalarReturnsRector to complete the string returns (#​6111)
  • [PhpDoc] Add warning about missing PhpDocInfo name form tag value node (#​6134)
  • [TypeDeclaration] Introducing ClosureReturnTypeRector to handle closure types separately (#​6106)
  • [TypeDeclaration] Skip has named arg on AddMethodCallBasedStrictParamTypeRector (#​6137)
  • [e2e][Printer] Handle crash indentation on AddParamBasedOnParentClassMethodRector (#​6112)

Bugfixes 🐛

  • [TypeDeclaration] Skip variadic on AddParamTypeBasedOnPHPUnitDataProviderRector (#​6150)
  • [TypeDeclaration] Add ConstFetch support on ReturnTypeFromStrictConstantReturnRector (#​6151)
  • Refactor BooleanTypeMapper to handle value based on context (#​6095)
  • Check root return in ReturnTypeFromReturnNewRector (#​6102)
  • Make ReturnUnionTypeRector run on PHP 8.0+ (#​6103)
  • ReturnUnionTypeRector now return only non-nullable types, to prepare space for new nullable rule as off PHP 7.1+ (#​6105)
  • [TypeDeclaration] handle explicit if else new on ReturnTypeFromReturnNewRector (#​6104)
  • [Php70] Swap min is higher than max on RandomFunctionRector (#​6109)
  • Split StringReturnTypeFromStrictScalarReturnsRector into string, bool and numeric scalar + strict return type rules (#​6113)
  • [Php71] Handle not identical to Float for empty string should compare to 0.0 on BinaryOpBetweenNumberAndStringRector (#​6117)
  • [TypeDeclaration] Skip void on BoolReturnTypeFromBooleanStrictReturnsRector (#​6118)
  • [TypeDeclaration] Fix inline closure type on ClosureReturnTypeRector (#​6119)
  • [TypeDeclaration] Skip start with shebang on DeclareStrictTypesRector (#​6121)
  • [Php52] Handle deep if stmts on ContinueToBreakInSwitchRector (#​6122)
  • [Php52] Handle in deep else on ContinueToBreakInSwitchRector (#​6123)
  • [TypeDeclaration] Clean up ArrowFunction check on ReturnTypeInferer (#​6124)
  • [TypeDeclaration] Skip union with yield on NumericReturnTypeFromStrictScalarReturnsRector (#​6125)
  • [Php82] Handle has only readonly properties but not all promoted property on ReadOnlyClassRector (#​6129)
  • refactor: Move function first-class-callable to a standalone rule (#​6131), Thanks @​nikolicaleksa!
  • typo (rectorphp/rector-src@d102bd1)
  • Fix ArrayDimFetchToMethodCallRector (#​6138), Thanks @​peterfox!
  • [CodeQuality] Skip used in static Closure/ArrowFunction on LocallyCalledStaticMethodToNonStaticRector (#​6139)
  • [CodeQuality] Skip multiple new lines on JoinStringConcatRector (#​6141)
  • [CodeQuality] Allow change empty() to [] compare of other object property usage on SimplifyEmptyCheckOnEmptyArrayRector (#​6147)
  • [Php55] Skip parse error on no concat in left in left Concat on PregReplaceEModifierRector (#​6148)
  • [CodingStyle] Handle with trait use adaptations on SeparateMultiUseImportsRector (#​6149)
  • [DeadCode] Remove unused @​var on key after remove key on RemoveUnusedForeachKeyRector (#​6135)
  • [DeadCode] Handle same namespace param type on RemoveUselessParamTagRector (#​6133)

Removed and deprecated 💀

  • Add - number support, deprecate ReturnTypeFromStrictScalarReturnExprRector functionality, already split (#​6114)
  • Deprecate BoolReturnTypeFromStrictScalarReturnsRector, use BoolReturnTypeFromBooleanStrictReturnsRector instead (#​6115)
  • [DeadCode] Skip fluent no return type on RemoveUnusedPrivateMethodRector (#​6108)
  • [DeadCode] Skip fluent no return type on RemoveUnusedPrivateMethodRector take 2 (#​6116)
  • [Php80] Skip used in compact() on RemoveUnusedVariableInCatchRector (#​6152)



rectorphp/rector-symfony

  • Correct return type definition for DataTransformerInterface (#​645), Thanks @​bobvandevijver
  • [Symfony 6.1] Improve CommandPropertyToAttributeRector to work with freshly created AsCommand (#​644)
  • Add more complex names support to CommandPropertyToAttributeRector (#​643)
  • [Symfony 6.3] Add ParamAndEnvAttributeRector (#​641)
  • [Symfony 6.2] Improve SecurityAttributeToIsGrantedAttributeRector (#​640)
  • Add args() support to AutowireAttributeRector (#​639)
  • [Config] Add configurable AutowireAttributeRector to add #[Autowire(...)] to services (#​637)
  • feat: add api-platform/core config key (#​635), Thanks @​dsdeboer
  • feat: add nelmio/cors-bundle config key (#​634), Thanks @​dsdeboer
  • feat: two additional config (#​633), Thanks @​dsdeboer
  • Hybrid CommandConfigureToAttributeRector (#​632), Thanks @​ruudk

rectorphp/rector-doctrine


rectorphp/rector-phpunit

v1.2.0: Released Rector 1.2.0

Compare Source

New Rules 🚀

  • [Renaming] Add RenameAttributeRector (#​6009)
  • [TypeDeclaration] Add AddClosureUnionReturnTypeRector (#​6033)
  • [TypeDeclaration] Add AddClosureNeverReturnTypeRector (#​6039)
  • [Php71] Add MultiDimensionalArrayToArrayDestructRector (#​6031), Thanks @​nikolicaleksa!
  • [TypeDeclaration] Add AddClosureReturnTypeFromStrictParamRector (#​6044)
  • [TypeDeclaration] Add AddClosureReturnTypeFromReturnCastRector (#​6061)
  • [TypeDeclaration] Add AddClosureReturnTypeFromStrictNativeCallRector (#​6059)

New Features 🥳

  • [DX] Add withAttributes(all) option, add PHPUnit and Doctrine code quality sets to withPreparedSets() (#​6004)
  • [DX] Add symfony code quality preset (#​6008)
  • [DX] Add withDowngradeSets() to better target downgrades (#​6015)
  • Add always config for EncapsedStringsToSprintfRector (#​6050), Thanks @​ruudk!
  • Add only_direct_assign config for SimplifyUselessVariableRector (#​6034), Thanks @​ruudk!
  • Skip files with short <?= PHP tag as leads to invalid changes (#​6068), (#​6075)
  • [Bridge] Add SetRectorsResolver, SetProviderCollector for easier use in 3rd-party tools (#​6030)
  • [DX] Inform about deprecated rules in config (#​6047)
  • [Config] Exclude listed on .gitignore for withRootFiles() (#​6028)

Bugfixes 🐛

  • AddTypeToConstRector: apply if const references another class const (#​6017), Thanks @​tugmaks!
  • fix: Skip adding string casting to closure return when it returns str… (#​6018), Thanks @​nikolicaleksa!
  • fix: Add code as a named argument (#​6062), Thanks @​nikolicaleksa!
  • Fix message handler removal in RemoveUnusedPublicMethodParameterRector (#​6001)
  • fix: Skip refactoring when foreach if statement contains calls to met… (#​6019), Thanks @​nikolicaleksa!
  • fix: Use named arguments if they are already used (#​6022), Thanks @​nikolicaleksa!
  • [Naming] Handle used in arrow function param, then used again outer ArrowFunction on RenameParamToMatchTypeRector (#​6046)
  • Fix docker commands in CONTRIBUTING.md (#​6023), Thanks @​tugmaks!
  • fix: Skip static calls which are made using the class name (#​6024), Thanks @​nikolicaleksa!
  • feat: Support functions for first-class-callable (#​6027), Thanks @​nikolicaleksa!
  • [Cleanup] Deprecate ChangeAndIfToEarlyReturnRector as creates less readable code with inverted conditions (#​6041)
  • fix: Convert DateTime to Carbon properly when negative days/months are used (#​6051), Thanks @​nikolicaleksa!
  • [Php81] Handle usage as arg by ref key on falsy ObjectType on ReadOnlyPropertyRector (#​6054)
  • fix: Skip remove always true condition on method calls (#​6063), Thanks @​nikolicaleksa!

Removed and Deprecated 💀

  • [TypeDeclaration] Remove ArrowFunction from ReturnTypeFromReturnDirectArrayRector and ReturnTypeFromReturnNewRector (#​6032)
  • [Cleanup] Remove @​changelog as no longer maintained/used, use RuleDefinition instead (#​6035)
  • [Cleanup] Remove FormatPerservingPrinter as only delegate method, use BetterStandardPrinter directly (#​6036)
  • Remove CurrentFileProvider from ValueResolver, let type resolver handle dir and filename (#​6069)
  • [Cleanup] Deprecate UseIncrementAssignRector as depends on context and might be intentional ([#​6042]
  • [CodeQuality] Deprecate GetClassToInstanceOfRector as can create invalid comparison (#​6005)
  • [Cleanup] Deprecate *ToTypeCastRector rules as no difference in performance, handle by cs instead (#​6043)
  • deprecate SetListInterface (rectorphp/rector-src@442bff7)
  • Unregister GetClassToInstanceOfRector from CodeQualityLevel.php (#​6006)
  • Split docblock name imports and name imports as different scope, skip for HTML nodes (#​6071)
  • [DX] Deprecate dump-node command, use more advanced https://getrector.com/ast instead (#​6040)

This is first release that includes news from other Rector core rules, so you know about all the hot stuff 😇

Symfony (rectorphp/rector-symfony)

New Rules and Improvements
  • Improve CommandConfigureToAttributeRector to allow merge with existing attribute (#​632), Thanks @​ruudk
  • feat: add web_profiler as config builder (#​631), Thanks @​dsdeboer
  • Add "hidden" support to CommandConfigureToAttributeRector (#​628)
  • [Symfony 7.0 and 7.1] Extend sets based on upgrade notes (#​627)
  • [Symfony 6.4] Add DataTransformerInterface return types (#​624)
  • [Symfony 6.4] Deprecate ChangeRouteAttributeFromAnnotationSubnamespaceRector, make use of RenameAttribute instead (#​623)
  • [Symfony 6.2] Add SecurityAttributeToIsGrantedAttributeRector (#​622)
  • [Symfony 6.1] Add CommandConfigureToAttributeRector (#​619)
  • [EventDispatcher] Skip EventListenerToEventSubscriberRector for classes with #[AsEventListener] attribute (#​616)
Deprecated
  • [Symfony 4.3] Deprecate WebTestCaseAssertSelectorTextContainsRector as does not create valid code (#​621)
  • [Symfony 4.0] Deprecate ProcessBuilderGetProcessRector, as change is not valid (#​620)
  • [CodeQuality] Deprecate MakeCommandLazyRector, as Symfony 6.1 introduces more reliable native attribute (#​618)
  • [Symfony 5.3] Deprecated CommandDescriptionToPropertyRector rule, as only middle step before 6.1 native attribute (#​617)

Doctrine - rectorphp/rector-doctrine

  • Add return doc block to Collection property's getter method by ToMany attribute (#​317), Thanks @​jszutkowski

PHPUnit - rectorphp/rector-phpunit

  • Add support for multiple dataProviders for a single test method (#​349), Thanks @​marcelthole
  • Remove NamedArgumentForDataProviderRector from the PHPUnit 11 set as optional upgrade path (#​348)
  • Fix prefixed scoped DataProvider class on NamedArgumentForDataProviderRector (#​347)
  • Make AddSeeTestAnnotationRector slightly more performant as very slow, keep existing see annotations (#​343)
  • [PHPUnit 10] Fix typo assertObjectHasNotProperty -> assertObjectNotHasProperty (#​340)
  • [PHPUnit 10] Rename assertObjectHasAttribute() to assertObjectHasProperty(), add AssertIssetToAssertObjectHasPropertyRector (#​338)
  • Fix AssertCompareToSpecificMethodRector to skip gettype checks, as will be deprecated in next PHPUnit version (#​337)

v1.1.1: Released Rector 1.1.1

Compare Source

[Performance] Fix huge performance hit by reverting children class detection (#​5995) - fixes https://github.com/rectorphp/rector/issues/8679, https://github.com/rectorphp/rector/issues/8638, https://github.com/rectorphp/rector/issues/8637


New Rules

  • [TypeDeclaration] Add ReturnTypeFromReturnCastRector (#​5905)
  • [TypeDeclaration] Add ReturnTypeFromSymfonySerializerRector (#​5908)
  • [TypeDeclaration] Add TypedPropertyFromJMSSerializerAttributeTypeRector (#​5909)
  • [TypeDeclaration] Add AddTypeFromResourceDocblockRector (#​5915)
  • [Php74] Add HebrevcToNl2brHebrevRector (#​5977)
  • [Php74] Add RestoreIncludePathToIniRestoreRector (#​5973)
  • [Carbon] Init set to migrate DateTime to Carbon (#​5868)
  • [Carbon] Add immutable support to other rules (#​5896)
  • Convert DateTimeImmutable to CarbonImmutable (#​5895)
  • Convert time() to Carbon::now()->timestamp (#​5901), Thanks @​kylekatarnls!

New Features and DX improvements 🥳

  • Add code quality levels (#​5910), Thanks @​carlos-granados!
  • [DX] Introduce set providers, to enable package + version based set registration (#​5976)
  • [DX] Report rules that registered in withSkip() but never registered in withRules() (#​5919)
  • [Set] Add new rector-preset set to have opiniated rector rules that can be enabled in rector-src and its extension (#​5924)
  • [DeadCode] Add RemoveUnusedPublicMethodParameterRector (#​5925)
  • [TypeDeclaration] Handle double declare(strict_types=1) addition on DeclareStrictTypesRector + IncreaseDeclareStrictTypesRector (#​5928)
  • [CodingStyle][Php80] Add join func call support on ConsistentImplodeRector (#​5958)
  • [CodeQuality] Add support for (), {}, [], <> delimiter on RegexPatternDetector (#​5957)
  • [TypeDeclaration] Add Static Call support on AddMethodCallBasedStrictParamTypeRector (#​5960)
  • [Config] Add withPhpPolyfill() method to load php polyfill set on RectorConfigBuilder (#​5983)
  • [DX] Add ->withPhpXSets() for PHP 7.4 and lower, improve ->withPreparedSets() (#​5984)
  • [config] Disable parallel on --debug (#​5904)
  • [Php80] Skip mixed doc with description and valid doc on MixedTypeRector (#​5906)
  • [DX] Add withPhpPolyfills() method to add polyfill rules (#​5981) https://github.com/rectorphp/rector-src/pull/5983
  • [DX] Ommit static functions/closure from coding-style, as often ignored and depends on personal preference (#​5916)
  • [DX] Ommit post-inc to pre-inc rule from coding-style as too opinionated (#​5917)
  • [DX] Remove UseIncrementAssignRector from coding-style set, as often ignored (#​5920)

Bugfixes 🐛

  • [AutoImport] No need RenamedClassesDataCollector usage on UsesClassNameImportSkipVoter (#​5921)
  • [Php81] Skip private method from instantiated class on FirstClassCallableRector (#​5929)
  • [NodeTypeCorrector] Directly use StringType on Intersection of strings on AccessoryNonEmptyStringTypeCorrector (#​5933)
  • [CodeQuality] Allow check in current Class_ with multiple props on CompleteDynamicPropertiesRector (#​5938)
  • [Naming] Handle rename property with only comment, without @​var doc on RenamePropertyToMatchTypeRector (#​5945)
  • Remove the renaming of apache_request_headers (#​5943), Thanks @​rhuijts!
  • [Naming] Handle nullable object @​var docblock on RenamePropertyToMatchTypeRector (#​5946)
  • [Php81] Skip param variable used in next stmt after coalesce on NewInInitializerRector (#​5971)
  • [Php71] Skip call abstract method on RemoveExtraParametersRector (#​5930)
  • [TypeDeclaration] Do not remove docblock with description on MergeDateTimePropertyTypeDeclarationRector (#​5931)
  • [DeadCode] Remove param docblock on RemoveUnusedPromotedPropertyRector when exists (#​5936)
  • [Cleanup] Remove deprecated AttributeKey::PARENT_NODE, remove deprecated NodeNameResolver::isCaseSensitiveName() (#​5939)
  • [NodeTypeResolver] Remove Property->type instanceof Node check on NodeTypeResolver->getType() (#​5947)
  • [BetterPhpDocParser] Remove unnecessary PrivatesAccessor usage on BetterTokenIterator and TokenIteratorFactory (#​5950)
  • [DeadCode] Skip dynamic variable on RemoveUnusedVariableAssignRector (#​5964)
  • [DeadCode] Reduce loop for used in next stmt on RemoveUnusedVariableAssignRector (#​5969)

Removed and Deprecated 💀

  • Remove deprecated and empty FinalizeClassesWithoutChildrenRector + FinalizePublicClassConstantRector (#​5980)
  • [DX] Soft-deprecate CallableThisArrayToAnonymousFunctionRector, as FirstClassCallableRector handles the same case better (#​5918)

v1.1.0: Released Rector 1.1.0

Compare Source

New Features 🥳

  • [PHPStan] Bump to PHPStan 1.11 (#​5883)

Bugfixes 🐛

  • [CodeQuality] Skip increment variable on else on TernaryFalseExpressionToIfRector (#​5867)
  • [CodeQuality] Skip on property and class const on CallableThisArrayToAnonymousFunctionRector (#​5869)
  • [NodeTypeResolver] Using built int ->isArray()->yes() on ArrayTypeAnalyzer::isArrayType() (#​5870)
  • Fix "method x was not found in reflection of class" (#​5871), Thanks @​staabm!
  • [NodeTypeResolver] Clean up array check on NameTypeResolver (#​5872)
  • [NodeTypeResolver] Clean up "this" from NameTypeResolver, as not from Name node (#​5873)
  • [TypeDeclaration] Skip array by doc with different assign on ReturnTypeFromStrictNewArrayRector (#​5875)
  • [TypeDeclaration] Skip possible array on StrictStringParamConcatRector (#​5876)
  • [Performance] Ensure call $reflector->reflectAllClasses() once on Worker take 3 (#​5878)
  • [Performance] Call cached class names collection on FamilyRelationsAnalyzer (#​5879)
  • [NodeTypeResolver] Clean up resolve cache class name key (#​5880)
  • [NodeTypeResolver] No need json_decode/json_encode for cache class name collection (#​5881)
  • [TypeDeclaration] Handle crash on interface Mixin on ReturnTypeFromStrictConstantReturnRector (#​5884)
  • [PHPStan] Handle PHPStan internal ShouldNotHappenException on FamilyRelationsAnalyzer and PHPStanNodeScopeResolver (#​5885)
  • [NodeTypeResolver] No need to resolve class name on anonymous classes (#​5886)
  • [PHPStan] Fix missingType.generics notice on phpstan.neon on PHPStan 1.11 (#​5888)
  • [TypeDeclaration] Skip unitialized property on EmptyOnNullableObjectToInstanceOfRector (#​5889)
  • [Php80] Skip remove non-mixed type doc on MixedTypeRector (#​5874)
  • [TypeDeclaration] Add test for nullable object usage on AddReturnTypeDeclarationRector (#​5887)
  • [Configuration] Add missing LevelSetList::UP_TO_PHP_84 on PhpLevelSetResolver::resolveFromPhpVersion() (#​5890)

v1.0.5: Released Rector 1.0.5

Compare Source

New Features 🥳

  • [TypeDeclarations] Add IncreaseDeclareStrictTypesRector to raise level of declare() coverage (#​5849)

Bugfixes 🐛

  • ExplicitReturnNullRector should skip never return (#​5802), Thanks @​staabm!
  • Make Compatible with phpstan 1.11.x code (#​5804)
  • [CodeQuality] Skip Always return in try catch with finally on ExplicitReturnNullRector (#​5807)
  • [CodeQuality] Skip never type on default switch on ExplicitReturnNullRector (#​5808)
  • [CodeQuality] Skip while(true) always returned on ExplicitReturnNullRector (#​5810)
  • [TypeDeclaration] Skip maybe not returned on while on ReturnUnionTypeRector (#​5812)
  • [Php81] Skip on property and class const on FirstClassCallableRector (#​5813)
  • [Php81] Skip __invoke() usage from non-class code on FirstClassCallableRector (#​5816)
  • [Php81] Skip always string if else DomElement on NullToStrictStringFuncCallArgRector (#​5822)
  • [TypeDeclaration] Handle crash on @​mixin usage on ReturnTypeFromStrictTypedCallRector (#​5823)
  • [Php81] Skip mixed type on ArrayDimFetch on NullToStrictStringFuncCallArgRector (#​5826)
  • Fix original quotes in PregReplaceEModifierRector (#​5827)
  • [CodeQuality] Skip $counter variable exists on ForRepeatedCountToOwnVariableRector (#​5828)
  • [Php81] Use PHPStan ParametersAcceptor to detect allowed argument types on NullToStrictStringFuncCallArgRector (#​5829)
  • [Renaming] Skip func call name on RenameClassRector (#​5833)
  • Support NullSafeMethod calls in unused-code analysis (#​5838), Thanks @​staabm!
  • Support NullSafeProperty fetches in unused-code analysis (#​5839), Thanks @​staabm!
  • Ignore phpdoc type in RecastingRemovalRector (#​5841), Thanks @​staabm!
  • [Naming] Skip DateTime as individual in name resolver (#​5842)
  • [Experiment] Rework child classes detection on DynamicSourceLocatorProvider (#​5735)
  • [Printer] Handle Strip left spaces from opening tags on namespaced PHP + HTML content (#​5851)
  • [CodeQuality] Fix tautology transformation on identical check on SimplifyTautologyTernaryRector (#​5854)
  • [CodeQuality] Skip dynamic second arg or has uppercase second arg on SimplifyStrposLowerRector (#​5855)
  • [NodeTypeResolver] Use existing DefaultReflector::reflectAllClasses() method on DynamicSourceLocatorProvider (#​5856)
  • [EarlyReturn] Skip with AssignOp on PreparedValueToEarlyReturnRector (#​5857)
  • [TypeDeclaration] Handle array with index assigned on TypedPropertyFromAssignsRector (#​5861)
  • [TypeDeclaration] Handle return by array shape type on AddArrowFunctionReturnTypeRector (#​5815)
  • [CodeQuality] Add Function_ and FuncCall support on OptionalParametersAfterRequiredRector (#​5835)
  • [Php83] Handle default native constant on AddTypeToConstRector (#​5843)
  • [PHP 7.2] Add error suppres support to each() rule (#​5844)
  • [TypeDeclaration] Skip more detailed type on AddMethodCallBasedStrictParamTypeRector (#​5866)
  • [DeadCode] Skip $this instanceof in Trait on RemoveAlwaysTrueIfConditionRector (#​5817)
  • [DeadCode] Skip $this in trait on RemoveDeadInstanceOfRector (#​5818)

v1.0.4: Released Rector 1.0.4

Compare Source

New Features and Changes 🥳

  • [Php84] Add ExplicitNullableParamTypeRector (#​5724)
  • [Transform] Adds ArrayDimFetchToMethodCallRector rule (#​5723), Thanks @​peterfox!
  • Add support for getOneOrNullResult() method in ChildDoctrineRepositoryClassTypeRector (#​5747)
  • Add boolean and support to RemoveDeadInstanceOfRector (#​5748)
  • [DeadCode] Add new rule - ReduceAlwaysFalseIfOrRector (rectorphp/rector-src@0dd1a43)
  • [CodeQuality] Add new rule - ExplicitReturnNullRector (#​5753)
  • [CodeQuality] Transform type|void docblock to type|null as well on ExplicitReturnNullRector after add return null (rectorphp/rector-src@576198c)
  • [CodeQuality] Add Function_ support on ExplicitReturnNullRector (#​5762)
  • [CodeQuality] Add Goto_ possible return null on SilentVoidResolver under Do_ (#​5773)
  • Add rector test suite to phpunit.xml or phpunit.xml.dist (#​5717), Thanks @​ghostwriter!
  • [Php82] Add VariableInStringInterpolationFixerRector (#​5781)
  • [DeadCode] Add RemoveUselessReadOnlyTagRector (rectorphp/rector-src@ef333de)

Bugfixes 🐛

  • [php84] Clean up contains null check type on ExplicitNullableParamTypeRector (#​5726)
  • Fixes for ArrayDimFetchToMethodCallRector (#​5727), Thanks @​peterfox!
  • Update ArrayDimFetchToMethodCall to use ObjectType (#​5728), Thanks @​peterfox!
  • [Configuration] Do not sets, skip, rules on empty array on RectorConfigBuilder (#​5731)
  • [Php81] Skip $this::class on trait on NullToStrictStringFuncCallArgRector (#​5732)
  • [Dep] Temporary pin to use nikic/php-parser 4.18.0 (#​5733)
  • Handle readonly class with attrs (#​5736), Thanks @​tugmaks!
  • [Scoper] Handle use nette/utils on php < 7.4 on 6th param on preg_replace_callback() (rectorphp/rector-src@fd9e172)
  • [Renaming][AutoImport] Handle after change annotation to attribute with rename on AnnotationToAttributeRector + RenameClassRector with auto import (#​5741)
  • [Php80] Skip var property usage on ClassPropertyAssignToConstructorPromotionRector (#​5744)
  • [Php80] Use identical compare on PromotedPropertyCandidateResolver (#​5745)
  • Fix ChildDoctrineRepositoryClassTypeRector for generic type (#​5746)
  • [DeadCode] Skip From docblock on ReduceAlwaysFalseIfOrRector (rectorphp/rector-src@f32dff3)
  • [CodeQuality] Skip if else return on ExplicitReturnNullRector (#​5755)
  • [CodeQuality] No need to re-update doc when already union null doc on ExplicitReturnNullRector (#​5757)
  • [CodeQuality] Skip __construct() method on ExplicitReturnNullRector (#​5758)
  • [CodeQuality] Move Yield_ and YieldFrom check to SilentVoidResolver (#​5759)
  • [CodeQuality] Skip do { } while always returned on ExplicitReturnNullRector (rectorphp/rector-src@cae0691)
  • [CodeQuality] Allow transform return; to return null; when there is other return with Expr on ExplicitReturnNullRector (#​5761)
  • [AutoImport] Allow auto import same namespace with sub use with docblock short name (rectorphp/rector-src@e3e741e)
  • [CodeQuality] Handle do { } while maybe returned on ExplicitReturnNullRector (#​5766)
  • More fixture on Do_ maybe returned (#​5767)
  • [DeadCode] Fix array callable with constructor args (#​5770), Thanks @​hogejiro!
  • [TypeDeclaration] Ensure always return with Expr on maybe continued in next stmt on SilentVoidResolver (#​5771)
  • [Scope] Fix resolve Scope from fluent call (#​5743)
  • Clean up scope skip scope check on ExprScopeFromStmtNodeVisitor (#​5776)
  • [NodeCollector] Fix non-string value on ArrayCallableMethodMatcher::resolveClassContextType() (#​5780)
  • [Printer] Apply configurable multiline on Fluent Method Call on print after method call created/re-printed (#​5779)
  • [TypeDeclaration] Handle initialized on getter on ReturnTypeFromStrictTypedPropertyRector (#​5784)
  • [TypeDeclaration] Handle in inner function on ReturnTypeFromStrictTernaryRector (#​5785)
  • [TypeDeclaration] Do not use Required::class reference on AutowiredClassMethodOrPropertyAnalyzer (#​5788)
  • [Performance][Php81] Early property promotion and readonly param check before changeable check on ReadOnlyPropertyRector (#​5791)
  • Fix removal of useless @​param tag when string|null insteadof ?string is used. (#​5684), Thanks @​arjenschol
  • [DeadCode] Clean up TypeHasher on Union Type (#​5792)
  • [NodeTypeResolver] Move UnionType doc vs FullyQualified native type as not equal to TypeComparator (#​5793)
  • Support @​immutable phpdoc in RestoreDefaultNullToNullableTypePropertyRector(#​5795), Thanks @​staabm
  • [CodeQuality] Skip Switch_ always returned on ExplicitReturnNullRector (#​5800)
  • [CodeQuality] Handle Switch maybe return on ExplicitReturnNullRector (#​5801)
  • [DeadCode] Skip use docblock on BooleanAnd check on RemoveDeadInstanceOfRector (#​5751)
  • [DeadCode] Skip isset() from property fetch from docblock on RemoveAlwaysTrueIfConditionRector (#​5754)

Removed 💀

  • [code-quality] Remove intval/strval from sets, as no clear difference and personal preference (#​5721)
  • [CodeQuality] Remove BoolvalToTypeCastRector and FloatvalToTypeCastRector as well from code-quality set (#​5722)
  • [CodingStyle] Remove usage of Reflection::expandClassName() from nette/utils 4.0 as cause bug on downgrade (#​5740)
  • [DeadCode] Skip implements interface on RemoveUnusedConstructorParamRector (#​5778)
  • [DeadCode] Skip Array Callable dynamic method using CLASS with constructor (no default args) on RemoveUnusedPrivateMethodRector (#​5774), Thanks @​hogejiro
  • [Php81] Remove @​readonly doc on transformation to native readonly on ReadOnlyPropertyRector (#​5789)
  • [DeadCode] Remove union with interface on RemoveUselessParamTagRector to make it consistent (#​5794)
  • [DeadCode] Skip property fetch on cond as may be overridden on RemoveAlwaysTrueIfConditionRector (#​5796)
  • [DeadCode] Skip @​param true on native bool type on RemoveUselessParamTagRector (#​5798)
  • ArgumentRemoverRectorTest: replace symfony\yaml reference with dummy (#​5799), Thanks @​janedbal!

v1.0.3: Released Rector 1.0.3

Compare Source

New Features and Improvements 🥳

  • [TypeDeclaration] Add ChildDoctrineRepositoryClassTypeRector (#​5695)
  • [TypeDeclaration] No need check parent method when method is private on AddVoidReturnTypeWhereNoReturnRector (#​5690)
  • [Php83] Add support +/- value on constant on AddTypeToConstRector (#​5694)
  • Add dump_node() helper function (#​5696)
  • [CodeQuality] Add Equal and NotEqual support on SimplifyIfReturnBoolRector (#​5697)
  • [CodeQuality] Add support for compare $this::class compare with string on UseIdenticalOverEqualWithSameTypeRector (#​5698)

Bugfixes 🐛

  • [Configuration] Fix parallel config always replaced by next config per-default true (#​5683)
  • [CodingStyle] Skip anonymous class on MakeInheritedMethodVisibilitySameAsParentRector (#​5688)
  • [Php80] Fix typo class name: DoctrineCoverterterAttributeDecorator -> DoctrineConverterAttributeDecorator (#​5689)
  • [Php81] Handle with attribute on ReadOnlyPropertyRector on property promotion (#​5692)
  • [Php72][TypeDeclaration] Fix infinite loop on ParseStrWithResultArgumentRector+DeclareStrictTypesRector (#​5699)
  • [CodeQuality] Skip sort/ksort on TernaryFalseExpressionToIfRector (#​5703)
  • fix: Strip left spaces from opening tags when comparing output for changes (#​5701), Thanks @​stilliard!
  • [CodingStyle] Skip implements interface on MakeInheritedMethodVisibilitySameAsParentRector (#​5707)
  • [CodeQuality] Skip throw after foreach with return in loop on SimplifyForeachToCoalescingRector (#​5714)
  • Skip mixed in ParamTypeByMethodCallTypeRector as not specific (#​5715)
  • [CodeQuality] Skip compare string with stringable object on UseIdenticalOverEqualWithSameTypeRector (#​5718)
  • [Php80] Skip ObjectType on ChangeSwitchToMatchRector (#​5719)

v1.0.2: Released Rector 1.0.2

Compare Source

New Features and changes 🥳

  • Add minimal memory limit for local run phpstan without result cache (#​5624), Thanks @​integer!
  • Add method RectorConfigBuilder::withSkipPath() (#​5626), Thanks @​integer!
  • Add basic validation for skipped path (#​5628), Thanks @​integer!
  • [Php80] Add DoctrineCoverterterAttributeDecorator to convert "false"/"true" string to false/true on nullable arg on Doctrine\ORM\Mapping\Column (#​5629)
  • Add const fetch to class const fetch rector. (#​5627), Thanks @​micaherne!
  • [DX] Add error message information for include full path to load internal phpstan bleedingEdge.neon config (#​5635)
  • [TypeDeclaration] Adds AddParamTypeForFunctionLikeWithinCallLikeArgDeclarationRector rule (#​5547), Thanks @​peterfox!
  • [Php83] Add type to final class constant (#​5662), Thanks @​philbates35!

Bugfixes 🐛

  • [Php83] Early check private method in child before check parent on AddOverrideAttributeToOverriddenMethodsRector (#​5622)
  • RectorConfigBuilder: skip and rules can be called multiple times (#​5623), Thanks @​integer!
  • [CodeQuality] Skip not autoloaded parent class on CompleteDynamicPropertiesRector (#​5636)
  • [Transform] Allow transform ruleWithConfiguration() to withConfiguredRule() on RectorConfigBuilderRector (#​5637)
  • [Rector] Allow transform sets() to withSets() on RectorConfigBuilderRector (#​5638)
  • [Transform] Allow transform disableParallel() to withoutParallel() on RectorConfigBuilderRector (#​5640)
  • [Transform] Allow transform fileExtensions() to withFileExtensions() (#​5641)
  • [Performance] [VendorLocker] Early allow change return type on private method on ClassMethodReturnTypeOverrideGuard::shouldSkipClassMethod() (#​5642)
  • [VendorLocker] Early return false on private method on ParentClassMethodTypeOverrideGuard::hasParentClassMethod() (#​5644)
  • [Renaming] Handle crash on RenameFunctionRector with die() and $_SESSION usage (#​5646)
  • Cleanup scope check on UnreachableStatementNodeVisitor (#​5648)
  • Keep comments in annotations when converting them to attributes (#​5650), Thanks @​carlos-granados!
  • [Util] Make consistent new line splitter to Util (#​5651)
  • [TypeDeclaration] Fix abs() returns on ReturnTypeFromStrictTypedCallRector (#​5652)
  • [TypeDeclaration] Allow abs() to return int when pass int arg on ReturnTypeFromStrictTypedCallRector (#​5653)
  • [TypeDeclaration] Skip possible returns false on ReturnTypeFromStrictNewArrayRector (#​5654)
  • [TypeDeclaration] Include MockObject&ClassName docblock with IntersectionTypeNode on TypedPropertyFromStrictSetUpRector (#​5655)
  • [Renaming] New Rule: RenameFunctionLikeParamWithinCallLikeArgRector (#​5554), Thanks @​peterfox!
  • [PHPStanStaticTypeMapper] Avoid double \ prefix on IntersectionTypeMapper (#​5656)
  • [BetterPhpDocParser] Clean up unnecessary create new ConstFetchNode() on ArrayItemClassNameDecorator (#​5658)
  • [Php71] Skip re-assign as string on AssignArrayToStringRector (#​5659)
  • [Privatization] Skip with suffix "TestCase" on FinalizeTestCaseClassRector (#​5660)
  • [Php71] Skip re-assign as string on AssignArrayToStringRector part 2 (#​5661)
  • [DeadCode] Fix infinite loop on RemoveDeadStmtRector + RemoveUnusedVariableAssignRector (#​5666)
  • [Php81] Skip execution operator on NullToStrictStringFuncCallArgRector (#​5667)
  • [Naming] Handle crash with numeric-string doc on RenamePropertyToMatchTypeRector (#​5670)
  • [CodeQuality] Handle crash on named arg on deep closure on OptionalParametersAfterRequiredRector (#​5671)
  • chore: bump min version of github actions (fix deprecations) (#​5675), Thanks @​Chris53897!
  • [PHP 8.0] Fix case insenstive false positive replacement for str_ends_with (#​5677)
  • [Transform] Allow transform phpVersion() to withPhpVersion() on RectorConfigBuilderRector (#​5678)
  • Fix duplicated fixture class name on StaticToSelfStaticMethodCallOnFinalClassRector test ([#​5679](https://togithub.com/rectorphp/rector-

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 was generated by Mend Renovate. View the repository job log.

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

Successfully merging this pull request may close these issues.

None yet

0 participants