Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 16, 2024

This PR contains the following updates:

Package Change Age Confidence
rector/rector (source) ^1.0.4 -> ^2.0.0 age confidence

Release Notes

rectorphp/rector (rector/rector)

v2.1.2: Released Rector 2.1.2

Compare Source

Bugfixes 🐛

  • Rectify (#​7058)
  • [Php82] Handle array dim fetch variable on VariableInStringInterpolationFixerRector (#​7060)
  • [Php82] Ensure ArrayDimFetch var is Variable to transform {$ on VariableInStringInterpolationFixerRector (#​7061)
  • Update LNumber and DNumber to Int_ and Float_ (#​7062)
  • [DeadCode] Handle crash on empty content on SimplifyIfElseWithSameContentRector (#​7063)
  • Fix return on SimplifyIfElseWithSameContentRector (#​7064)
  • [CodeQuality] Skip when class has __isset() method on IssetOnPropertyObjectToPropertyExistsRector (#​7067)
  • [ReplaceArgumentDefaultValueRector] handle multiple replace argument values (#​9256) (#​7068), Thanks @​JohJohan!

New Features 🥳

  • [Php56] Add parentheses on unary minus pow left on PowToExpRector (#​7065)

Removed 💀

  • [removal] Remove RectorConfigBuilderRector as not maintained and broken (#​7066)

rectorphp/rector-symfony

  • [SYMFONY 4.4] replace Link withRel and withoutRel argument values with constants (#​821), Thanks @​JohJohan
  • [SYMFONY 5.1] replace Cookie withSameSite argument values with constants (#​819), Thanks @​JohJohan
  • [SYMFONY 4.2] replace Cookie argument values with constants (#​818), Thanks @​JohJohan
  • [SYMFONY 3.2] replace Cookie argument values with constants (#​817), Thanks @​JohJohan
  • [SYMFONY 6.3] replace Link argument values with constants (#​816), Thanks @​JohJohan
  • [Symfony73] Handle nested array on ConstraintOptionsToNamedArgumentsRector (#​815)
  • [Symfony 74] Rename Application::add() to Application::addCommand() (#​813), Thanks @​mttsch
  • [SYMFONY 4.4] replace Link argument values with constants (#​812), Thanks @​JohJohan
  • [Symfony 74] Rename Application::add() to Application::addCommand() (#​809), Thanks @​mttsch

rectorphp/rector-doctrine

  • Update deprecated ArrayItem, Lnumber to use under Node, and Int_ instead (#​456)

rectorphp/rector-phpunit

  • Update to use ArrayItem under Node (#​504)

rectorphp/rector-downgrade-php

  • [DowngradePhp80] Handle not match @​return with native return type on DowngradeUnionTypeDeclarationRector (#​295)
  • Clean up origNode set on DowngradeArrayAllRector (#​294)
  • [DowngradePhp84] Add DowngradeArrayFindKeyRector (#​293)
  • [DowngradePhp84] Add DowngradeArrayFindRector (#​292)
  • [DowngradePhp84] Add DowngradeArrayAnyRector (#​291)
  • [DowngradePhp84] Add DowngradeArrayAllRector (#​290)

v2.1.1: Released Rector 2.1.1

Compare Source

New Features 🥳


Bugfixes 🐛

  • [CodeQuality] Properly handle Goto_ on ExplicitReturnNullRector (#​7018)
  • [Php84] Skip non-array on ForeachToArray* rules (#​7023)
  • [Console] Handle hidden "process" with --option without = on ConsoleApplication (#​7022)
  • [Php80] Handle with property hook on ClassPropertyAssignToConstructorPromotionRector (#​7024)
  • [Scoped] Exclude DateRangeError on Scoper for prefixing (#​7027)
  • [Php84] Handle multi lines text on DeprecatedAnnotationToDeprecatedAttributeRector (#​7028)
  • [Php55] Avoid $scope = ScopeFetcher::fetch($node); when not needed on GetCalledClassToStaticClassRector (#​7029)
  • Fix crash on ExactCompareFactory::createBooleanAnd/Or (#​7031)
  • Move ScopeFetcher::fetch() to near its usage (#​7032)
  • [CodeQuality][Php84] Handle crash on ForeachToArrayFindRector+OptionalParametersAfterRequiredRector (#​7033)
  • [Php84] Skip foreach value used after foreach on ForeachToArray* rules (#​7034)
  • [Php84] Handle key used on conditional on ForeachToArray* rules (#​7035)
  • [code-quality] Make ctor defined dynamic properties private, as most probably case (#​7036)
  • [PostRector] Keep first comment after declare(strict_types=1) on UnusedImportRemovingPostRector (#​7042)
  • [Php80] Make configurable to allow skip on model based classes on ClassPropertyAssignToConstructorPromotionRector (#​7043)
  • [Kaizen] Save kaizen applied rules into cache to make works on parallel (#​7046)
  • [Kaizen] No need filter unchanged files when --kaizen is used (#​7050)
  • [Kaizen] When no files changed, early return empty on FilesFinder, even on kaizen (#​7051)
  • [Kaizen] Enforce clear cache when there is files changed + kaizen enabled (#​7052)
  • Fix ambiguous variable name (#​7053)
  • [Php84] Handle with space on message like class name constant on DeprecatedAnnotationToDeprecatedAttributeRector (#​7056)
  • [CodeQuality] LogicalToBooleanRector should add parentheses on equal (#​7048)
  • [Kaizen] Remove unneeded clean kaizen cache since all cache cleared early when there are files to be changed + kaizen enabled (#​7054)



rectorphp/rector-symfony 🎵

  • Fix code style issues (#​810), Thanks @​mttsch
  • [Symfony 74] Rename Application::add() to Application::addCommand() (#​809), Thanks @​mttsch
  • Fix links to Symfony 7.2/7.3 upgrade documents (#​808), Thanks @​mttsch
  • [Symfony 7.3] Handle existing named array arguments in ConstraintOptionsToNamedArgumentsRector (#​807), Thanks @​gharlan
  • [Symfony 73] add ConstraintOptionsToNamedArgumentsRector (#​806), Thanks @​pedrocasado
  • Twig attributes: make methods public (#​805), Thanks @​gharlan
  • AddVoteArgumentToVoteOnAttributeRector (#​804), Thanks @​tugmaks
  • [CodeQuality] Skip first class callable on StringCastDebugResponseRector (#​803)
  • [code-quality] Add StringCastDebugResponseRector (#​802)
  • add casting to string to AssertSameResponseCodeWithDebugContentsRector as response can be null, and message requires string (#​801)

rectorphp/rector-doctrine 🟠


rectorphp/rector-phpunit 🟢

v2.1.0: Released Rector 2.1

Compare Source

This release comes with new PHP 8.4 rules and 2 new config options, that make rules more powerful 💪


New Features 🥳

In this release we also add 2 DX features to streamline upgrades:

  • [DX] Add ->withTreatClassesAsFinal() on so can be used in typed rules (#​6974)
    • this extends more conservative rules to apply on classes that are not final
  • [experimental] Add --kaizen option to apply only first X rules at a time (#​6876)
    • this option will apply first X rules; especially great to make upgrade steps small, but relevant - check the PR for more

Bugfixes 🐛

  • [Php80] Skip non-abstract method trait on AddParamBasedOnParentClassMethodRector (#​6992)
  • [Php81] Skip has JMS attribute on ReadOnlyPropertyRector (#​6979)
  • [TypeDeclaration] Move JMS class string definition constant to ClassName value object (#​6980)
  • [PhpAttribute] Ensure count($attributeGroups) before loop to avoid repetitive annotation product only single AttributeGroup (#​6985)
  • [code-quality] use direct instanceof instead of dummy null, if nullable object type is known (#​6987)
  • Fix object type in TypedPropertyFromJMSSerializerAttributeTypeRector (#​6989)
  • ExplicitReturnNullRector: skip on goto (#​6988), Thanks @​staabm!
  • fix invalid string property type without default in PropertyTypeFromStrictSetterGetterRector (#​6993)
  • [CodeQuality] Skip first class callable on TernaryImplodeToImplodeRector (#​6997)
  • Fix: Array Duplicated Key which is dynamic (#​6999), Thanks @​peterfox!
  • [Php83] Ensure class->isAbstract() on FeatureFlags::treatClassesAsFinal() check (#​7003)
  • [TypeDeclaration] Handle crash on generic iterable on TypedPropertyFromJMSSerializerAttributeTypeRector (#​7004)
  • [TypeDeclaration] Use common has < string for detect iterable types (#​7005)
  • Covers scenario where func_get_args used in constructor (#​7006), Thanks @​peterfox!
  • [DeadCode] Move Param used via variadic functions to ParamAnalyzer (#​7016)
  • [DeadCode] Skip used by unpack and named argument on RemoveUnusedPrivateMethodParameterRector (#​6976)
  • [DeadCode] Handle multiple default on RemoveArgumentFromDefaultParentCallRector (#​6978)
  • [DeadCode] Skip abstract method on RemoveUnusedPublicMethodParameterRector (#​7002)
  • [DeadCode] Allow named argument removal if argument position is equal with parameter position equal name on RemoveUnusedPrivateMethodParameterRector (#​6977)
  • [Php80] Skip used in finally on RemoveUnusedVariableInCatchRector (#​6982)
  • [DeadCode] Allow remove normal param that mix with property promotion on RemoveUnusedConstructorParamRector (#​7017)

rectorphp/rector-symfony 🎵

  • fix to type arg name (#​800)
  • [jms] Add AccessorAnnotationToAttributeRector (#​799)
  • [jms] Add custom AccessTypeAnnotationToAttributeRector to handle annotation flip to attribute correctly (#​798)

rectorphp/rector-doctrine 🟠

  • [typed-collections] Add RemoveNullFromInstantiatedArrayCollectionPropertyRector (#​452)
  • skip behats (#​451)
  • skip RemoveIfInstanceofCollectionRector in tests (#​450)
  • add generic union support (#​448)
  • add param / return test fixture (#​447)
  • add docblock support to NarrowArrayCollectionToCollectionRector (#​446)
  • initialize default array even for non-entity-property collections (#​445)
  • remover default null (#​444)
  • add local call setter support (#​443)
  • Add intersection support to NarrowPropertyUnionToCollectionRector (#​442)
  • remove nullable property type (#​441)
  • Add native return type declaration support to NarrowReturnUnionToCollectionRector (#​440)
  • add array-filter to ArrayMapOnCollectionToArrayRector (#​439)
  • [typed-collections] Add CurrentOnCollectionToArrayRector (#​438)
  • [typed-collections] Add RemoveUselessIsEmptyAssignRector (#​437)
  • add boolean and not null case (#​436)
  • skip it (#​435)
  • [typed-collections] Add RemoveIfCollectionIdenticalToNullRector (#​434)
  • add native property type support to NarrowPropertyUnionToCollectionRector (#​433)
  • add union null type support to RemoveNullFromNullableCollectionTypeRector (#​431)
  • add nullable property doclbock support to RemoveNullFromNullableCollectionTypeRector (#​430)
  • [typed-collections] Add ArrayOffsetSetToSetCollectionCallRector (#​429)
  • include message as well (#​428)
  • add static call support to AssertSameCountOnCollectionToAssertCountRector (#​427)
  • keep args in RemoveNullsafeOnCollectionRector (#​426)
  • [typed-collections] Add AssertSameCountOnCollectionToAssertCountRector (#​425)
  • [typed-collections] Add RemoveAssertNotNullOnCollectionRector (#​424)
  • [typed-collections] Add AssertNullOnCollectionToAssertEmptyRector (#​423)

v2.0.19

Compare Source

v2.0.18: Released: Rector 2.0.18

Compare Source

New Features 🥳

  • Bump to PHP-Parser ^5.5.0 (#​6946)
  • [DeadCode] Add RemoveArgumentFromDefaultParentCallRector (#​6949)
  • [DeadCode] Add RemoveDeadCatchRector rule (#​6939), Thanks @​P3gucka!

Bugfixes 🐛

  • [Php80] Add more exact Expr node that always bool for switch(true) usage on ChangeSwitchToMatchRector (#​6965)
  • [Php80] Prevent adding empty return when stringable always throws (#​6968), Thanks @​Mika-!
  • [php 8.0] Check if class is an attribute in AnnotationToAttributeRector, to avoid non-attribute bug (#​6954)
  • [Transform] Fix FQCN usage on new name on MergeInterfacesRector (#​6956)
  • Rectify (#​6957)
  • [Printer] Skip change new line as space on anonymous class on print (#​6958)
  • [Printer] Use regex string new space detection for anonymous class (#​6959)
  • [Php80] Handle dynamic bool expr on ChangeSwitchToMatchRector (#​6961)
  • [Php80] Do not change to match(true) on defined case cond on ChangeSwitchToMatchRector (#​6962)
  • [Php80] Do not change to match(true) on variable from param on case cond on ChangeSwitchToMatchRector (#​6963)
  • Fix fixture file name (#​6964)
  • [Renaming] [Symfony 7.0] Skip ClassConstFetch that rename its ->class to Interface that constant not exists in new interface (#​6966)
  • Fix stub (#​6967)
  • [DeadCode] Clean up useless union StmtsAwareInterface|ClassMethod on TerminatedNodeAnalyzer (#​6969)
  • [Php80] Handle has silent void on StringableForToStringRector (#​6970)
  • [PostRector] Clean up rename process on ClassRenamingPostRector (#​6971)
  • [DeadCode] Early check skip no extends on RemoveDefaultArgumentFromParentCallRector (#​6950)
  • [DeadCode] Allow remove createMock method call on RemoveUnusedVariableAssignRector (#​6951)
  • [DeadCode] Skip when next catch is parent class exception with special treatment over just throw on RemoveDeadCatchRector (#​6952)

rectorphp/rector-symfony 🎵

  • [Symfony 7.3] Handle commands without configure method in InvokableCommandInputAttributeRector (#​797), Thanks @​gharlan
  • [Symfony 7.3] Handle fluent call addArgument and addOption on InvokableCommandInputAttributeRector (#​795)
  • Twig attributes: add required first param (#​793), Thanks @​gharlan
  • Fix namespace of console Option attribute (#​792), Thanks @​gharlan
  • fix: Normalize variable names by replacing hyphens with underscores in Symfony73 command argument and option processing (#​790), Thanks @​antoniovj1
  • remove return tags in TemplateAnnotationToThisRenderRector as no longer needed (#​788)
  • return array if is array type in TemplateAnnotationToThisRenderRector (#​786)
  • Bump to php-parser 5.5.0 and update fixture attributes usage (#​784)

rectorphp/rector-doctrine 🟠

  • [typed-collections] Add RemoveNullsafeOnCollectionRector (#​420)
  • skip assign of New_ to CollectionParamTypeSetterToCollectionPropertyRector (#​419)
  • fix reprint of type in CollectionSetterParamNativeTypeRector (#​418)
  • Various improvements in typed-collections set (#​417)
  • Skip RemoveNullFromNullableCollectionTypeRector if not exactly 1 param or in tests (#​416)
  • [typed-collections] allow 2nd+ param to be nullable in CollectionSetterParamNativeTypeRector as most likely null can be passed as non-setter (#​415)
  • cleanup redundant fixtures, single rule (#​414)
  • [Dbal40] Skip different object on ExecuteQueryParamsToBindValueRector (#​413)
  • [dbal 4.0] Add ExecuteQueryParamsToBindValueRector (#​412)
  • [dbal 4.0] Add deprecated PDO class to enum like (#​411)
  • [dbal 4.2] Add AddArrayResultColumnNamesRector (#​410)

rectorphp/rector-downgrade-php ⬇️

  • [DowngradePhp73] Real patch for previous node token just swapped with trailing comma and named argument (take 2) (#​288)
  • [Test] Add more test fixture for downgrade named argument with trailing comma (#​287)
  • [Down to PHP 7.2] Handle download named argument with trailing comma (#​285)

v2.0.17: Released: Rector 2.0.17

Compare Source

New Features 🥳

  • [Php85] Add ArrayFirstLastRector (#​6900)
  • Use active voice and add markdown style for code blocks (#​6897), Thanks @​simonschaufi!
  • [Php83] Add ReadOnlyAnonymousClassRector (#​6916)
  • [Php83] Add DynamicClassConstFetchRector (#​6922)
  • [Test] Add test for crash after reprint Stmt (#​6924)
  • [Command] Fix to make additionalAutoloader->autoloadPaths() works on both parallel and non-parallel proccess (#​6927)
  • [Alternative] Add EnumCaseToPascalCaseRector with use of DynamicSourceLocatorProvider (#​6899)

Bugfixes 🐛

  • Directly use isNames() in rector rules (#​6896)
  • [StrContainsRector] also replace multibyte functions fro strpos and strstr (#​6901), Thanks @​JohJohan!
  • [DeadCode] IsClassMethodUsedAnalyzer needs to use Scope from Class_ level (#​6910)
  • [Php84] Skip with parentheses on class on NewMethodCallWithoutParenthesesRector (#​6911)
  • [CodeQuality] Skip Assign Op on ternary on SimplifyUselessVariableRector (#​6913)
  • Rectify to trigger latest build (#​6914)
  • [Php82] Handle implicit public readonly on ReadOnlyClassRector (#​6919)
  • Use dynamic check on last on ClassConstManipulator (#​6921)
  • bump (rectorphp/rector-src@695228f)
  • [Naming] Re-use repetitive DateTimeInterface object type check on services into PropertyNaming service (#​6926)
  • [AutoImport] Skip conflict aliased with docblock on auto import (#​6929)
  • [AutoImport] Skip reserved class names on auto import (#​6933)
  • [AutoImport] Fix empty uses on auto import + rename class on no namespaced file (#​6935)
  • [Php83] Fix invalid constant use READONLY_CLASS -> READONLY_ANONYMOUS_CLASS on ReadOnlyAnonymousClassRector (#​6936)
  • fix: RenameMethodRector does not rename trait methods (#​6928), Thanks @​LordSimal!
  • [CodeQuality] Skip late static binding use on CompleteDynamicPropertiesRector (#​6938)
  • [dx] report false skipped rules in more nicer way (#​6941)
  • [PHP84] Deprecated annotation to Deprecated attribute (#​6923), Thanks @​peterfox!
  • [Renaming] Allow rename method in trait itself on RenameMethodRector (#​6942)
  • [Renaming] Handle rename caller on trait on RenameMethodRector (#​6944)
  • [TypeDeclaration] Fix crash on already return static on AddReturnTypeDeclarationRector (#​6940)
  • [TypeDeclaration] Handle crash on return different over static on AddReturnTypeDeclarationRector-a (#​6943)

Removed 💀

  • Use active voice and remove note about PHPUnit (#​6907), Thanks @​simonschaufi!
  • [DeadCode] Skip used by Array callable on RemoveEmptyClassMethodRector (#​6908)
  • [DeadCode] Use IsClassMethodUsedAnalyzer service on RemoveEmptyClassMethodRector (#​6909)
  • [DeadCode] Handle called by static call on RemoveUnusedPrivateMethodParameterRector (#​6912)
  • [DeadCode] Skip used by $this on RemoveUnusedPrivateClassConstantRector (#​6920)



rectorphp/rector-symfony 🎵

  • Update to use ramsey/composer-install@v2 (#​782)
  • [Symfony 7.3] Make __invoke() public in InvokableCommandInputAttributeRector (#​779), Thanks @​mickverm
  • Fix ClassConstFetch use on InvokableCommandInputAttributeRector (#​778)
  • [Symfony 7.3] handle name from constant on InvokableCommandInputAttributeRector (#​777)
  • [Symfony 7.3] Remove Argument argument: mode on InvokableCommandInputAttributeRector (#​776), Thanks @​mickverm
  • [Symfony 7.3] Make nullable argument param type on Optional InputArgument::OPTIONAL on InvokableCommandInputAttributeRector (#​775)
  • [Symfony 7.3] Keep $output param on InvokableCommandInputAttributeRector (#​774)
  • [Symfony 7.3] Add Argument arguments: name, mode, description on InvokableCommandInputAttributeRector (#​773)
  • [Symfony 7.3] Handle with #[\Override] on InvokableCommandInputAttributeRector (#​772)

rectorphp/rector-doctrine 🟠

  • skip default param array, to respect colleciton type (#​408)
  • Add array<> support to /NarrowParamUnionToCollectionRector (#​407)
  • [typed-collections] Add CollectionSetterParamNativeTypeRector (#​406)
  • only remove new array collection to a new property (#​405)
  • Update to use ramsey/composer-install@v2 (#​404)
  • [typed-collections] Add embed many support InitializeCollectionInConstructorRector (#​403)
  • Add static call support to setter array collection wrap (#​402)
  • [typed-collections] Decouple RemoveIsArrayOnCollectionRector (#​401)
  • [typed-collections] Allow new array in tests for RemoveNewArrayCollectionOutsideConstructorRector (#​400)
  • [typed-collections] Allow new array in tests for RemoveNewArrayCollectionOutsideConstructorRector (#​399)
  • [typed-collections] Add nullable support to array wrapper rule (#​398)
  • [TypedCollections] Use directly param->type->type assign on RemoveNullFromNullableCollectionTypeRector (#​397)
  • [typed-collections] Add RemoveNullFromNullableCollectionTypeRector rule (#​396)
  • Typed collections fixes (#​395)
  • [typed-collections] remove DefaultNewArrayCollectionRector as duplicate of InitializeCollectionInConstructorRector (#​394)
  • Fix scoper Doctrine class in use statement prefixed with RectorPrefix (#​393)
  • [typed-collections] Add dozens of rules to handle doctrine collection types (#​392)
  • Rename ExplicitRelationCollectionRector to InitializeCollectionInConstructorRector (#​391)
  • [typed-collections] Make TypedPropertyFromToManyRelationTypeRector work only for native types, docblocks are handled in another rule (#​390)
  • [typed-collections] Decouple new namespace and move 4 rules there (#​389)
  • Directly use isName(s) and getName() on rector rules (#​388)
  • Add mapped superclass case to ToManyRelationPropertyTypeResolver (#​387)
  • Remove array on collection in TypedPropertyFromToManyRelationTypeRector (#​386)
  • Remove default null value in TypedPropertyFromToManyRelationTypeRector (#​384)

rectorphp/rector-phpunit 🟢

  • [code-quality] Add additional non-static methods to NonAssertNonStaticMethods (#​497), Thanks @​philiprabbett
  • [CodeQuality] Skip in static arrow function on PreferPHPUnitThisCallRector (#​496)
  • Update to use ramsey/composer-install@v2 (#​495)
  • Only remove @​covers when target exists (#​494)
  • PHPUnit 10/11 Only set attribute when target attribute class exists on CoversAnnotationWithValueToAttributeRector (#​493)
  • [AnnotationsToAttributes] Apply to class level on @​uses on AnnotationWithValueToAttributeRector (#​492)
  • [PHPUnit 12] Add RemoveOverrideFinalConstructTestCaseRector (#​491)
  • [CodeQuality] Skip with if else condition result on AddInstanceofAssertForNullableInstanceRector (#​489)

v2.0.16: Released Rector 2.0.16

Compare Source

New Features 🥳

  • [dx] add symfonyRoute and symfonyValidator option to ->withAttributesSets() to ease upgrade (#​6882)
  • [nette/utils] [4.0] Add upgrade set to handle named args in Json class (#​6884)

Bugfixes 🐛

  • [TypeDeclaration] Skip __destruct() from add return type based on parent on AddReturnTypeDeclarationBasedOnParentClassMethodRector (#​6883)
  • [CodeQuality] Skip with init non empty dynamic array on ForeachItemsAssignToEmptyArrayToAssignRector (#​6881)
  • UseIdenticalOverEqualWithSameTypeRector should not trust phpdoc (#​6880), Thanks @​staabm!
  • [Php70] Handle class named Pool on Php4ConstructorRector (#​6887)
  • [Php73] Handle key() called multiple times on ArrayKeyFirstLastRector (#​6888)
  • Clean up repetitive recursive call and flag on ArrayKeyFirstLastRector (#​6889)
  • [Config] Handle config realpath() actually has asterisk, not pattern (#​6891)
  • [Php82] Handle implicit "public" on construtor promotion on ReadOnlyClassRector (#​6895)



rectorphp/rector-symfony 🎵

  • [Symfony73] Skip different object on GetFunctionsToAsTwigFunctionAttributeRector (#​767)
  • skip magic first class callable (#​766)
  • [symfony 7.2] AddPushRequestToRequestStackConstructorRector (#​765)
  • [Symfony 7.3] kick off GetFunctionsToAsTwigFunctionAttributeRector (#​764)
  • [Symfony 7.3] Handle first class callable on GetFiltersToAsTwigFilterAttributeRector (#​763)
  • Register symfony73-twig-bundle into Symfony7SetProvider (#​762)
  • [symfony 7.3] Add GetFiltersToAsTwigFilterAttributeRector to migrate #[TwigFilter] (#​761)
  • [code-quality] Improve TemplateAnnotationToThisRenderRector to keep ternary types (#​758)
  • Keep JsonResponse type (#​757)
  • Remove array shape return in TemplateAnnotationToThisRenderRector as no longer used (#​755)
  • Add attribute support to TemplateAnnotationToThisRenderRector (#​754)
  • [7.3] Update InvokableCommandRector to InvokableCommandInputAttributeRector to improve discoverability (#​743)

rectorphp/rector-doctrine 🟠

  • Remove array on collection in TypedPropertyFromToManyRelationTypeRector (#​386)
  • Remove default null value in TypedPropertyFromToManyRelationTypeRector (#​384)
  • [collection] Add embed many annotation support to TypedPropertyFromToManyRelationTypeRector (#​383)
  • Fix #[AsListener] attribute location to doctrine bundle 2.8, deprecate doctrine constants and refer to composer based sets (#​382)

rectorphp/rector-phpunit 🟢

  • Detect Test Attribute in TestsNodeAnalyzer::isTestClassMethod (#​486), Thanks @​Levivb
  • [code-quality] Skip ctor to setup in ConstructClassMethodToSetUpTestCaseRector for non-test classes, e.g. helpers (#​485)
  • [phpunit 10] Add ParentTestClassConstructorRector (#​484)

v2.0.15: Released Rector 2.0.15

Compare Source

New features and changes 🎉

  • [parallel] bump default threads from 16 to 32 to keep up with modern technology (#​6877)

Bugfixes 🐛

  • [TypeDeclaration] Reduce repetitive new ObjectType() on each properties on TypedPropertyFromCreateMockAssignRector (#​6869)
  • [CodeQuality] Handle with parentheses on SimplifyIfReturnBoolRector (#​6871)
  • [Naming] Skip protected property on non-final class on RenamePropertyToMatchTypeRector (#​6872)
  • [PHPStan 2.1.14] Fix resolve __toString() parent non builtin method without return type (#​6879)
  • [phpstan] prefer isName() from abstract class over protected service (#​6875)
  • [DeadCode] Skip value from docblock on RemoveFilterVarOnExactTypeRector (#​6873)



rectorphp/rector-symfony 🎵

  • [symfony 6.2] Fix attribute adding on abstract class in MessageHandlerInterfaceToAttributeRector (#​724)

rectorphp/rector-phpunit 🟢

  • [depre] Remove deprecated AssertCountWithZeroToAssertEmptyRector (#​483)
  • Ensure that rule PreferPHPUnitSelfCall refactor call only for static methods, not any (#​482), Thanks @​andrew-demb
  • [tests] add test fixture for double instanceof check (#​481)
  • [PhpUnit] Skip different object on PreferPHPUnit(This/Self)CallRector (#​480)

v2.0.14: Released Rector 2.0.14

Compare Source

Bugfixes 🐛

  • [EarlyReturn] Skip re-assign in loop on PreparedValueToEarlyReturnRector (#​6867)
  • [EarlyReturn] Only check on loop when initialAssign is set on PreparedValueToEarlyReturnRector (#​6868)

v2.0.13: Released Rector 2.0.13

Compare Source

Bugfixes 🐛

  • [naming] Skip public properties in RenamePropertyToMatchTypeRector to avoid external code conflicts (#​6860)
  • feat: handle edge cases of DateFuncCallToCarbonRector (#​6822), Thanks @​tony-stark-eth!
  • [CodeQuality] Skip ArrayDimFetch on IssetOnPropertyObjectToPropertyExistsRector (#​6862)
  • [type-declaration] Skip intersection type on TypedPropertyFromCreateMockAssignRector (#​6863)
  • [Configuration] Fix composer resolver with custom vendor-dir (#​6864), Thanks @​maxime-vf!
  • Ensure pass string on PathNormalizer::normalize() on InstalledPackageResolver (#​6865)

rectorphp/rector-symfony 🎵

  • [Symfony 7.3] add constant and test for 7.3 and test help to attribute #​718 (#​722), Thanks @​JohJohan
  • Update fixture on parent construct empty usage (#​719)

rectorphp/rector-doctrine 🟠

  • improve add generics annotation to repository to code quality doctrine set (#​380)

v2.0.12: Released Rector 2.0.12

Compare Source

New Features 🥳

  • [dx] [experimental] Prepend command name automatically if only paths are passed (#​6759)
### before
vendor/bin/rector process src

### now - default command is run, no need to write the sole main command manually
vendor/bin/rector src
  • [Configuration] [experimental] Add ability to specify file path without extension (#​6839)
  • [type-declaration] Add AddClosureParamArrayWhereDimFetchRector (#​6815)
  • [dx] add test to check that a rule is not applied if it does not change the code (#​6794), Thanks @​carlos-granados!
  • [renaming Add enum support to rename method (#​6832)
  • [Php83] Make configurable to allow add #[\Override] on override empty method on AddOverrideAttributeToOverriddenMethodsRector (#​6831)
  • [Transform] Follow parent construct before add new param on StaticCallToMethodCallRector (#​6854)

Bugfixes 🐛

  • Skip DateTime from property type to property renaming to keep code readable (#​6812)
  • Add a hint how to upgrade custom SetListInterface to Rector 2.0 (#​6816), Thanks @​alexander-schranz!
  • Return if var type has changed in PhpDocTypeChanger (#​6813), Thanks @​carlos-granados!
  • fix: RenamePropertyToMatchTypeRector renames DateTimeInterface (#​6814), Thanks @​tony-stark-eth!
  • [TypeDeclaration] ReturnTypeFromStrictNewArrayRector support list (#​6820), Thanks @​staabm!
  • [Php80] Handle null value on AnnotationToAttributeRector (#​6821)
  • [DeadCode] Handle crash on no stmts on ReplaceBlockToItsStmtsRector (#​6824)
  • [type-declaration] Override existing wrong type on TypedPropertyFromCreateMockAssignRector (#​6826)
  • [TypeDeclaration] Skip already typed with PHPUnit\Framework\MockObject\MockObject on TypedPropertyFromCreateMockAssignRector (#​6827)
  • [NodeTypeResolver] Pass null on 2nd arg on ReflectionProvider->getFunction() to ensure get correct function (#​6829)
  • [Php80] Handle aliased with multi properties on AnnotationToAttributeRector (#​6838)
  • [Configuration] Fix root standalone registered rules verify on RectorConfigBuilder (#​6840)
  • [Php73] Fix escaped single quote on RegexDashEscapeRector (#​6843)
  • [Php80] Handle crash on @​testdoc with rector-phpunit AnnotationWithValueToAttributeRector (#​6846)
  • Fix scoped error on ClassConstFetchAnnotationToAttributeMapper (#​6848)
  • [PhpAttribute] Handle multi double colon on AnnotationWithValueToAttributeRector (#​6851)
  • [Transform] Follow empty parent construct parameters on StaticCallToMethodCallRector (#​6855)
  • [TypeDeclaration] Skip with closure inside on AddArrowFunctionParamArrayWhereDimFetchRector (#​6817)
  • [Php71] Skip replaced native function on RemoveExtraParametersRector (#​6828)
  • [DeadCode] Skip switch break not unreachable on RemoveUnreachableStatementRector (#​6837)

rectorphp/rector-symfony 🎵

  • Clean up #[RunClassInSeparateProcess] tweak (#​721)
  • [CodeQuality] Handle crash on no extensions on StringExtensionToConfigBuilderRector (#​717)
  • add ampersand support (#​716)
  • [code-quality] Add SplitAndSecurityAttributeToIsGrantedRector (#​715)
  • [code-quality] Add SecurityAttributeToIsGrantedRector (#​714)
  • [code-quality] Add attribute-existance check to SecurityAttributeToIsGrantedAttributeRector, add to code-quality set (#​713)
  • Skip excluded tag in container (#​710), Thanks @​Myks92

rectorphp/rector-doctrine 🟠

  • [NodeAnalyzer] Handle no repositoryClass

Configuration

📅 Schedule: Branch creation - "after 9am on monday,before 12am on monday" in timezone Europe/Paris, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, 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.

@renovate renovate bot requested a review from Abouhassane as a code owner December 16, 2024 09:54
Copy link
Contributor Author

renovate bot commented Dec 16, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: composer.lock
Command failed: composer update rector/rector:2.1.4 --with-dependencies --ignore-platform-req='ext-*' --ignore-platform-req='lib-*' --no-ansi --no-interaction --no-scripts --no-autoloader --no-plugins --minimal-changes
Loading composer repositories with package information
Dependency phpstan/phpstan is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies.
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires rector/rector ^2.0.0, found rector/rector[2.0.0, ..., 2.1.4] but these were not loaded, likely because it conflicts with another require.
  Problem 2
    - driftingly/rector-laravel is locked to version 1.2.0 and an update of this package was not requested.
    - driftingly/rector-laravel 1.2.0 requires rector/rector ^1.0 -> found rector/rector[1.0.0, ..., 1.2.10] but it conflicts with your root composer.json require (^2.0.0).

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

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.

0 participants