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

chore(deps): update dependency rector/rector to v2 #373

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

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Dec 14, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
rector/rector (source) 1.2.4 -> 2.0.9 age adoption passing confidence

Release Notes

rectorphp/rector (rector/rector)

v2.0.9: Released: Rector 2.0.9

Compare Source

Bugfixes 🐛

  • [Php81] Exclude Doctrine ODM MongoDB Document and EmbeddedDocument from ReadOnlyPropertyRector (#​6721), Thanks @​mickverm!
  • [PostRector] Handle with FQCN docblock on UnusedImportRemovingPostRector (#​6722)
  • Type hint array reduce closure (#​6725), Thanks @​peterfox!
  • [PHPStan 2.1.3] Add ReflectionAttribute and ReflectionIntersectionType stub for PHPStan 2.1.3 (#​6723)

v2.0.8: Released: Rector 2.0.8

Compare Source

New Features 🥳


Bugfixes 🐛

  • [CodeQuality] Skip with comment inside on SimplifyIfElseToTernaryRector (#​6683)
  • [CodeQuality] Skip windows absolute path on AbsolutizeRequireAndIncludePathRector (#​6684)
  • [Strict] Handle in assign on BooleanInIfConditionRuleFixerRector (#​6685)
  • Replace ambiguous wrapped_with_brackets with existing attribute wrapped_in_parentheses (#​6691)
  • [NodeTypeResolver] Clean up wrap in parentheses check ReprintNodeVisitor (#​6692)
  • [Php80][TypeDeclaration] Fix crash on ClassPropertyAssignToConstructorPromotionRector + ReturnNeverTypeRector (#​6694)
  • CodeClimate output format (#​6697), Thanks @​VitalyArt!
  • Exclude node modules path (#​6702), Thanks @​vaishnavyogesh!
  • Fix str_getcsv() escape argument on PHP 8.4 (#​6704)
  • [Php74] Handle crash curly based array on trait on CurlyToSquareBracketArrayStringRector (#​6706)
  • [Php73] Handle infinite cast on StringifyStrNeedlesRector (#​6707)
  • Clean up unused use (#​6708)
  • fix: NewlineBeforeNewAssignSetRector variable as same name like property (#​6705), Thanks @​guideloince!
  • [TypeDeclaration] Skip override trait method on StrictStringParamConcatRector (#​6711)
  • [Test] Clean up test on WorkerCommandLineFactoryTest (#​6714)
  • [DX] Move isWindows() method from AbstractRectorTestCase to AbstractLazyTestCase (#​6715)
  • [Performance] Use exactly equal or append / file path check on RealpathMatcher (#​6716)
  • [TypeDeclaration] Allow union with closure type on property on TypedPropertyFromAssignsRector (#​6717)
  • [DeadCode] Skip union falsy mixed on trait on RecastingRemovalRector (#​6718)
  • Skip hexa chars in EncapsedStringsToSprintfRector (#​6719)
  • [CodingStyle] Rename method: containsASCIIChar to containsControlASCIIChar on EncapsedStringsToSprintfRector (#​6720)

v2.0.7: Released Rector 2.0.7

Compare Source

New Features 🥳


Bugfixes 🐛

  • [type-declaration] Add typed property, if traits do not duplicate the property (#​6663)
  • [removing] Add interface support to RemoveInterfaceRector (#​6681)
  • fix: add Symfony support as a composer-based option (#​6673), Thanks @​ayedbelsem!
  • [CodeQuality] Handle on assign on FlipTypeControlToUseExclusiveTypeRector (#​6653)
  • [Performance] Early return FullyQualifiedObjectType on FQCN on ObjectTypeSpecifier (#​6658)
  • [CodeQuality] Skip indirect return on SimplifyIfReturnBoolRector (#​6660)
  • [Php83] Handle concat in first argument on CombineHostPortLdapUriRector (#​6661)
  • [TypeDeclaration] Skip unset by trait on TypedPropertyFromStrictConstructorRector (#​6664)
  • [Renaming] Skip used by trait as property promotion on RenamePropertyToMatchTypeRector (#​6665)
  • [TypeDeclaration] Skip changed by ref from trait on TypedPropertyFromStrictConstructorRector (#​6666)
  • [CodeQuality] Handle with assign missing parentheses on ExplicitBoolCompareRector (#​6668)
  • use ->ignoreVCSIgnored() on RectorConfigBuilder::withRootFiles() over custom logic (#​6669)
  • [BetterPhpDocParser] Check for closing brace in text content (#​8977) (#​6670), Thanks @​andrewnicols!
  • [AutoImport] Handle FQCN with sub namespace (#​6672)
  • [BetterPhpDocParser] Use str_contains() for DoctrineAnnotationDecorator (#​6671) (#​6674), Thanks @​andrewnicols!
  • [AutoImport] Handle inner with sub namespace on auto import (#​6679)
  • [DeadCode] Skip dynamic name on RemoveParentCallWithoutParentRector (#​6659)



rectorphp/rector-symfony 🎵

  • Back to require-dev rector-src:dev-main (#​697)
  • Update GetBySymfonyStringToConstructorInjectionRector fixture test to cover rector-srv:tv-readonly-add-ctor (#​696)

rectorphp/rector-doctrine 🟠


rectorphp/rector-phpunit 🟢

  • [PHPUnit 10] Register PropertyExistsWithoutAssertRector to phpunit100.php (#​443)
  • Added testcase to demonstrate rector#8977 (#​440), Thanks @​andrewnicols
  • [PHPUnit10] Replace deleted PHPUnit methods (#​438), Thanks @​66Ton99

v2.0.6: Released: Rector 2.0.6

Compare Source

New Features 🥳

  • [dx] Add --only-suffix to filter files by suffixes (#​6647)
  • [DeadCode] Add ReplaceBlockToItsStmtsRector (#​6641)
  • [DeadCode] Add RemoveUselessAssignFromPropertyPromotionRector (#​6643)
  • Add readonly by default on new promoted property (#​6650)
  • Use autowired method if exists in adding new dependency (#​6652)

Bugfixes 🐛

  • [CodeQuality] Handle crash inside block statement with unreachable statement on OptionalParametersAfterRequiredRector (#​6640)
  • [DX] Use Param->isPromoted() over param->flags !== 0 check on promotion property check (#​6646)
  • [Php80] Keep numeric string, string "true", "false" as is on StringAnnotationToAttributeMapper (#​6610)
  • [PHPStan ^2.1.1] Handle next unreachable statement via UnreachableStatementNode->getNextUnreachableStatements() (#​6642)

Removed 💀

  • [Parser] Remove SmartPhpParserFactory and SmartPhpParser (#​6651)

v2.0.5: Released: Rector 2.0.5

Compare Source

This release support PHP-Parser 5.4.0 and PHPStan 2.1.0

Feature

  • Bump to PHP-Parser ^5.4.0 with use patches fix-patch-php-parser-54 patches (#​6637)
  • Bump to PHPStan ^2.1.0 (#​6639)
  • [DeadCode] Allow remove useless @​ var on typed class constant as well on RemoveUselessVarTagRector (#​6633)

Removed 💀

  • Remove unused AssignVariableNameResolverInterface instances (#​6631)

Bugfixes 🐛

  • [DX] Warn about ->withPhpSets() called multiple times, to avoid invalid set mix (#​6632)
  • [CodeQuality] Skip fopen() or die() on LogicalToBooleanRector on assign (#​6635)
  • use vendor-patches main branch that already include php-parser 5.4.0 patch (#​6638)

v2.0.4: Released Rector 2.0.4

Compare Source

New Features 🥳

  • [PHP 8.0] Add lcfirst annotation to attribute support (#​6577)
  • Add multiline comment fixture (#​6580)
  • [TypeDeclaration] Add param type to array map closure (#​6377), Thanks @​peterfox!
  • [deprecation] Add message about deprecated MixedTypeRector rule, Remove deprecated SetListInterface as no longer used (#​6590)
  • [Php81][php82] Add AttributeGroupNewLiner to make new line based on token on ReadOnlyPropertyRector and ReadOnlyClassRector (#​6618)
  • [Php84] Add rule for RoundingMode enum (#​6369), Thanks @​jorgsowa!

Bugfixes 🐛

  • [dx] polyfill sets is running out of the box in php sets (#​6591)
  • [phpstan] Fix var assumed ignored errors (#​6571)
  • [phpstan] fix next ingored errors (#​6572)
  • [CodeQuality] Handle crash on property hook on OptionalParametersAfterRequiredRector (#​6575)
  • [PHP 8.0] Make AnnotationToAttributeRector return after 1st newline without slash (#​6578)
  • [Php80] Fix end slash regex on AttributeValueResolver (#​6579)
  • Fix annotation on doctrine one (#​6582)
  • [Comments] Move left over clean empty doc handling to DocBlockUpdater (#​6584)
  • fix: replace getKey method for name property (#​6583), Thanks @​carlosvinicius!
  • fix: replace getKey/getValue methods when enum is a variable (#​6585), Thanks @​carlosvinicius!
  • [Php80] Handle comment multi line on AttributeValueResolver (#​6586)
  • [Php80] Use more proper check for doc comment multi lines on AttributeValueResolver (#​6587)
  • [Php80] Handle value as argument with keep description as comment on AttributeValueResolver (#​6589)
  • withRootFiles now apply rector for dotfiles too (#​6592), Thanks @​andrew-demb!
  • 📦 Ignore .phpstorm.meta.php because this is not PHP file (#​6594), Thanks @​andrew-demb!
  • [Php81] Skip reassign on array destruct on ReadOnlyPropertyRector (#​6596)
  • [Php80] Handle crash on multi next stmts on ChangeSwitchToMatchRector (#​6597)
  • [CodingStyle] Handle crash on pass args on CallUserFuncToMethodCallRector (#​6598)
  • [Php81] Skip with next required on NewInInitializerRector (#​6599)
  • Move FunctionLike reindex under StmtsAwareInterface on NodeAttributeReIndexer (#​6605)
  • [DeadCode] Skip value variable used in throw stmts in catch on UnusedForeachValueToArrayKeysRector (#​6607)
  • Revert "[Php80] Keep numeric string as is on StringAnnotationToAttributeMappe…" (#​6609)
  • [Php54] Use token base replace on LongArrayToShortArrayRector (#​6616)
  • [Performance] Only register WrappedNodeRestoringNodeVisitor() when there is found AlwaysRememberedExpr or Match_ node on processNodes() (#​6620)
  • [Fix] Renamed gzwrites (undefined function) to gzwrite (#​6622), Thanks @​Vqcheslav!
  • [FunctionLike] Skip return by ref with switch on SimplifyUselessVariableRector (#​6623)
  • Rollback SimpleCallableNodeTraverser usage on ByRefReturnNodeVisitor (#​6624)
  • [TypeDeclaration] Skip assign on while cond on WhileNullableToInstanceofRector (#​6628)
  • [TypeDeclaration] Skip assign in if condition on BinaryOpNullableToInstanceofRector (#​6629)
  • Clean up ignore phpstan errors (#​6630)
  • [DeadCode] Skip @​return positive-int|0 on RemoveUselessReturnTagRector (#​6576)
  • [DeadCode] Skip key variable used in throw stmts in catch on RemoveUnusedForeachKeyRector (#​6606)

Removed 💀

  • Remove TypeNormalizer as type comparison is handled well by PHPStan (#​6570)
  • Removed unused method ClassChildAnalyzer-> hasParentClassMethod() (#​6595), Thanks @​staabm!
  • [Experiment] Remove WrappedNodeRestoringNodeVisitor (#​6626)

v2.0.3

Compare Source

v2.0.2

Compare Source

v2.0.1

Compare Source

v2.0.0: Released Rector 2.0

Compare Source

Rector 2.0 is here 🥳

The main purpose of this release is performance improvements, thanks to modern dependencies:

  • php-parser 4.x to 5.0
  • PHPStan 1.x to 2.0
  • and min PHP version 7.2 to 7.4 because of dependencies above

We've managed to fit in couple cool features: 5 New Features in Rector 2.0


For custom rules writers, see upgrading guide. The rest of upgrade is straighforward 🎉


To celebrate the upgrade, we're also modernized our logo! 🤩


New Features and Improvements 🎉

  • Add "--only" option to process only a single rule (#​6441), Thanks @​cweiske!
  • [DX] Add version-based set loading based on installed package version (#​6428)
  • [dx] enable polyfills by default when PHP is on, to make config simpler (#​6433)
  • [dx] enable all attributes, if none are selected to streamline config (#​6451)
  • feat: add the option to use the annotation value as an argument to the attribute (#​6468), Thanks @​carlos-granados!
  • feat: add Behat annotations to attributes set (#​6510), Thanks @​carlos-granados!

Deprecated and Removed 💀

  • [deprecation] Deprecate AbstractScopeAwareRector in favor of single AbstractRector (#​6425)
  • [deprecation] Deprecate MixedTypeRector, to avoid mixed type filled blindly, use type declaration set instead (#​6434)
  • [docs] getRuleDefinition() no longer required for custom rules (#​6440)
  • [deprecation] Remove deprecated PublicConstantVisibilityRector, cleanup deprecated SetListInterface (#​6424)
  • [deprecated] Remove deprecated AbstractTestCase (#​6426)

Bugfixes 🐛

  • [Php80] Returns null on no change on ClassPropertyAssignToConstructorPromotionRector (#​6418)
  • [attributes] Make sure the target attribute class exists (#​6454)
  • [TypeDeclaration] Skip test methods with exception in ReturnNeverTypeRector, [php74] Skip conditinal assign in RestoreDefaultNullToNullableTypePropertyRector as most likely desired to assign or fail (#​6430)
  • Support php-64bit as required in composer.json (#​6432), Thanks @​hans-thomas!
  • [dx] Allow external rules without getRuleDefinition() to make them easier to write (#​6438)
  • [fix] class phpdoc generic method (#​6439), Thanks @​lammafish!
  • Fix RemoveDoubleAssignRector in case of method call (#​6442)
  • Upgrade to PHPParser 5 and PHPStan 2 (#​6431)
  • [CodeQuality] Handle crash on return array constant on ExplicitReturnNullRector (#​6458)
  • [Php80] Handle crash single quoted doctrine on AnnotationToAttributeRector (#​6459)
  • [Php71] Skip already array destruct on ListToArrayDestructRector (#​6460)
  • [TypeDeclaration] Skip mixed as on right of and on ParamTypeByMethodCallTypeRector (#​6401)
  • [Renaming] Fix space on union docblock during rename on RenameClassRector (#​6463)
  • [CodeQuality] Skip used by array callable on LocallyCalledStaticMethodToNonStaticRector (#​6473)
  • [CodeQuality] Skip compare nullable object on UseIdenticalOverEqualWithSameTypeRector (#​6474)
  • Use Type->getIterableValueType() over ArrayType-> getItemType() (#​6479), Thanks @​staabm!
  • [DeadCode] Allow remove assign variable with next method call on RemoveDoubleAssignRector (#​6443)
  • [DeadCode] Handle InterpolatedStringPart crash on RemoveUnusedForeachKeyRector (#​6457)
  • [DeadCode] Skip used by get_object_vars() when implements JsonSerializable on RemoveUnusedPromotedPropertyRector (#​6472)
  • [DeadCode] Handle crash on valid conditional type on RemoveUselessReturnTagRector (#​6475)
  • Use Type->getIterableKeyType() over ArrayType->getKeyType() (#​6480), Thanks @​staabm!
  • Update developing with docker: Fix php version to 8.2. (#​6490), Thanks @​uncaught!
  • [Renaming] Handle docblock aliased rename on RenameClassR* [Php81] Allow not readonly property on API Platform api resource (#​6531), Thanks @​alexndlm!
    ector (#​6498)
  • [CodeQuality][Renaming] Handle DynamicDocBlockPropertyToNativePropertyRector+RenameClassRector with aliased name (#​6506)
  • [TypeDeclaration] Skip with default value and assigned mixed on TypedPropertyFromAssignsRector (#​6514)
  • [Php80] Mirror comments on assign on ChangeSwitchToMatchRector (#​6516)
  • [Php70] Handle parent method call on Php4ConstructorRector (#​6519)
  • [Php70] Do not replace if method call if method exists in current class on call same method with parent on Php4ConstructorRector (#​6520)
  • [PostRector] Keep first comment before first Use_ on UnusedImportRemovingPostRector (#​6522)
  • [Php81] Allow not readonly property on API Platform api resource (#​6531), Thanks @​alexndlm!
  • [Php81] Skip by ref param on ReadOnlyPropertyRector (#​6532)
  • [Php70] Handle ArrayDimFetch on WrapVariableVariableNameInCurlyBracesRector (#​6533)
  • Fix fixture end ] fixture on NestedAnnotationToAttributeRector (#​6537)
  • [Php80] Handle mix quote single and double on AnnotationToAttributeRector (#​6538)
  • [CodeQuality] Handle crash on yield from on OptionalParametersAfterRequiredRector (#​6545)
  • Fix str_contains() never returns 0 (#​6546)
  • [CodeQuality] Handle crash on unary minums on OptionalParametersAfterRequiredRector (#​6547)
  • [CodeQuality] Handle crash on assign ref on OptionalParametersAfterRequiredRector (#​6551)
  • [Attributes] Cover slash newline in AnnotationToAttributeRector with values (#​6557)
  • [TypedPropertyFromAssignsRector] Handle parse_url() native function with second arg on TypedPropertyFromAssignsRector (#​6562)
  • [TypeDeclaration] Handle default value with contant type on TypedPropertyFromAssignsRector (#​6563)
  • [NodeTypeResolver] Handle namespaced function call name on NodeTypeResolver (#​6564)

rectorphp/rector-symfony 🎵

  • Fill listener method name, based on kernel.x event name in EventListenerToEventSubscriberRectory (#​694)
  • [scoped] Fix scoped prefixed UrlGeneratorInterface on RedirectToRouteRector (#​692)
  • [DependencyInjection] Add GetBySymfonyStringToConstructorInjectionRector (#​688)
  • [DependencyInjection] Add TraitGetByTypeToInjectRector (#​687)
  • [DependencyInjection] Extract CommandGetByTypeToConstructorInjectionRector to make migration smoother (#​686)
  • [DependencyInjection] Extract GetByTypeMethodCallToConstructorInjectionRector to make migration smoother (#​685)
  • [Symfony 7.2] Add SetList (#​684), Thanks @​alamirault
  • Upgrade deprecated ScopeAware to AbstractRector (#​680)
  • Fix twig 2.40 set to 2.4 (#​678)
  • [deprecation] Remove deprecated rules (#​677)
  • Remove deprecated set list marker (#​676)

rectorphp/rector-doctrine 🟠

  • [deprecation] Remove deprecated AddReturnDocBlockToCollectionPropertyGetterByToManyAttributeRector, InitializeDefaultEntityCollectionRector, TypedPropertyFromDoctrineCollectionRector (#​347)

rectorphp/rector-phpunit 🟢

  • [PHPUnit] Support list in YieldDataProviderRector (#​418), Thanks @​staabm
  • [Phpunit] Avoid reprint doc for remove/replace when no @​return tag on YieldDataProviderRector (#​417)
  • [PHPUnit] Add missing DocblockUpdater usage on YieldDataProviderRector when removing @​return doc (#​416)
  • [PHPUnit] Change @​return array<> to @​return Iterator<> on YieldDataProviderRector (#​415)
  • [CodeQuality] Handle createMock as well in PreferPHPUnitThisCallRector (#​407)
  • [fix] Keep original message in AssertEqualsOrAssertSameFloatParameterToSpecificMethodsTypeRector (#​406)
  • [PHPUnit 10] Remove AssertIssetToAssertObjectHasPropertyRector (#​405)
  • [CodeQuality] Skip possible data provider method called and used as array on YieldDataProviderRector (#​404)

v1.2.10: Released Rector 1.2.10

Compare Source

New Features 🥳

  • [PHP8.3] add new rectors for get_class()/get_parent_class() without arguments (#​6405), Thanks @​cabbey!

Bugfixes 🐛

  • Fix ClassDependencyManipulator to add dependency on right position (#​6413)
  • [Php81] Skip Doctrine Embeddable on ReadOnlyPropertyRector (#​6411)
  • [Privatization] Skip with parameter on PrivatizeLocalGetterToPropertyRector (#​6412)

Removed 💀

  • [DeadCode] Skip nullable @​ template on RemoveUselessReturnTagRector (#​6409)



rectorphp/rector-phpunit 🟢

  • [PHPUnit 10] Skip with Magic __get() on AssertIssetToAssertObjectHasPropertyRector (#​403)
  • [CodeQuality] Add CreateMockToDirectNewRector (#​402)
  • [CodeQuality] Add SingleMockPropertyTypeRector (#​401)
  • [CodeQuality] Skip used by trait and multiple props on NarrowUnusedSetUpDefinedPropertyRector (#​400)
  • Skip property with default value in NarrowUnusedSetUpDefinedPropertyRector (#​398)
  • [CodeQuality] Add FlipAssertRector (#​397)
  • Add count() support to AssertCompareOnCountableWithMethodToAssertCountRector (#​395)
  • Add enum/const fetch support to AssertEqualsToSameRector (#​394)
  • skip static property in NarrowUnusedSetUpDefinedPropertyRector (#​393)

v1.2.9: Released Rector 1.2.9

Compare Source

Bugfixes 🐛

  • [Strict] Using in_array() on CallLike instead of double call on Strict Rules (#​6388)
  • [CodeQuality] Handle If cond as assign on ExplicitBoolCompareRector (#​6389)
  • [CodeQuality] Skip append non empty array on ForeachItemsAssignToEmptyArrayToAssignRector (#​6390)
  • [Php80] Mirror return comment on ChangeSwitchToMatchRector (#​6394)
  • [TypeDeclaration] Skip union intersection types on php 8.1, allow on php 8.2+ (#​6395)
  • [Php80] Skip @​template T as mixed on MixedTypeRector (#​6399)
  • [DeadCode] Check TemplateType instance check on Dead*TagValueNodeAnalyzer (#​6400)
  • [CodeQuality] Skip multiple lines on JoinStringConcatRector (#​6404)
  • [CodingStyle] Skip equal modifier on direct parent method compatible on MakeInheritedMethodVisibilitySameAsParentRector (#​6406)

Removed 💀

  • [DeadCode] Handle consecutive equal case stmts on RemoveDuplicatedCaseInSwitchRector (#​6392)
  • [DeadCode] Handle handle consecutive equal with jump different case on RemoveDuplicatedCaseInSwitchRector (#​6393)
  • [DeadCode] Skip @​template tag on RemoveUselessVarTagRector (#​6396)
  • [DeadCode] Support multiple templates in RemoveUselessVarTagRector (#​6402), Thanks @​dragosprotung!



rectorphp/rector-symfony 🎵


rectorphp/rector-phpunit 🟢

  • [code-quality] Add NarrowUnusedSetUpDefinedPropertyRector (#​388)
  • Add enum/const fetch support to AssertEqualsToSameRector (#​394)
  • Add count() support to AssertCompareOnCountableWithMethodToAssertCountRector (#​395)
  • [AnnotationsToAttribute] Skip not in test on AnnotationWithValueToAttributeRector (#​387)
  • Add ReplaceTestFunctionPrefixWithAttributeRector (#​386), Thanks @​blackwolf12333

v1.2.8: Released Rector 1.2.8

Compare Source

Bugfixes 🐛

  • [UnusedImport] Fix removing multiple uses (#​6376), Thanks @​jorgsowa!
  • [PostRector] Clean up variables and conditional usage on UnusedImportRemovingPostRector (#​6378)
  • [PostRector] Reduce repetitive toString() on loop on UnusedImportRemovingPostRector (#​6379)
  • [CodeQuality] Skip no @​ property doc on DynamicDocBlockPropertyToNativePropertyRector (#​6380)
  • [CodeQuality] Handle with other attributes on DynamicDocBlockPropertyToNativePropertyRector (#​6381)
  • [CodeQuality] Use existing PhpAttributeAnalyzer service instead of AttributeFinder from Doctrine package on DynamicDocBlockPropertyToNativePropertyRector (#​6382)
  • Fix duplicated register ContinueToBreakInSwitchRector in php52.php and php73.php (#​6385)
  • [AutoImport] Fix missing @​ in deep annotation auto import (#​6386)
  • [DeadCode] Skip non FullyQualified property type on RemoveTypedPropertyNonMockDocblockRector (#​6383)

New Features 🥳

  • [CodeQuality] Add DynamicDocBlockPropertyToNativePropertyRector (#​5691)
  • [DX] [Experimental] Add withPhpLevel() to raise PHP level one rule at a time (#​6261)

v1.2.7: Released Rector 1.2.7

Compare Source

New Features 🥳


Bugfixes 🐛

  • Fixed --memory-limit=-1 option handling when used in parallel (#​6349), Thanks @​ddegasperi!
  • [Php70] Fix delimiter in the middle on EregToPregMatchRector (#​6356)
  • [Php70] More delimiter case in the middle fix on EregToPregMatchRector (#​6357)
  • [Php80] Cast string/int for int vs string condition and case condition on ChangeSwitchToMatchRector (#​6359)
  • [DeadCode] Skip from call with return docblock on ReduceAlwaysFalseIfOrRector (#​6361)
  • [TypeDeclaration] Closure Param Types from Iterator Source (#​6345), Thanks @​peterfox!
  • [Privatization] Allow privatize protected promoted property on PrivatizeFinalClassPropertyRector (#​6360)
  • [DeadCode] Skip with Else and ElseIf on SimplifyIfNotNullReturnRector (#​6365)
  • [Php70] Handle empty branch crash on unprintable char \x0C on EregToPregMatchRector (#​6368)
  • [UnusedImport] Different letter case for classes + optimization (#​6362), Thanks @​jorgsowa!
  • [CodeQuality] Skip else indirect return on SimplifyIfReturnBoolRector (#​6371)
  • [CodeQuality] Clean up else check on SimplifyIfReturnBoolRector (#​6372)
  • [TypeDeclaration] Fix deep nested array docblock with \ prefix on ReturnTypeFromStrictNewArrayRector (#​6373)
  • [EarlyReturn] Skip nested with OR in root if statement condition on ChangeNestedForeachIfsToEarlyContinueRector (#​6375)
  • [DeadCode] Skip RemoveUnusedPrivatePropertyRector in middle assign (#​6363)

Removed 💀

  • [NodeAnalyzer] Remove ClassAnalyzer::isAnonymousClassName() (#​6351)
  • [NodeAnalyzer] Remove unused AstResolver on VariadicAnalyzer (#​6353)
  • [DeadCode] Clean up double private method filtering on RemoveUnusedPrivateMethodRector (#​6364)
  • [DeadCode] Skip union docblock param with is_object() native type check on RemoveAlwaysTrueIfConditionRector (#​6370)



rectorphp/rector-symfony 🎵

  • [CodeQuality] Add AddTraitGetterReturnTypeBasedOnSetterRequiredRector (#​671)

rectorphp/rector-phpunit 🟢

  • [PHPUnit 10] Add ifs as default way for withConsecutive, as more readable and opens upgrade during PHPUnit 9 (#​382)
  • Use simple direct assert on consecutive in case of arrow function in callable (#​381)
  • Use more readable ifs on will return in WithConsecutiveRector (#​380)
  • add NarrowSingleWillReturnCallbackRector to code quality set (#​379)

v1.2.6: Released Rector 1.2.6

Compare Source

New Features 🥳

  • [TypeDeclaration] Add isset(), empty(), and negation support on BoolReturnTypeFromBooleanStrictReturnsRector (#​6339)
  • [TypeDeclaration] Add NativeMethodReflection support on ReturnStrictTypeAnalyzer (#​6344)
  • [DX] Show paths not match any file/directory on ProcessCommand when given path not exists (#​6307)

Bugfixes 🐛

  • [TypeDeclaration] Convert inline @​var tag to assert() (#​6300), Thanks @​carlos-granados!
  • Fix incorrect result after using RemoveByType in PhpDocInfo (#​6301), Thanks @​carlos-granados!
  • [TypeDeclaration] Skip nullable callable on TypedPropertyFromAssignsRector (#​6308)
  • Fix LocallyCalledStaticMethodToNonStaticRector when static function is called using the class name (#​6310), Thanks @​carlos-granados!
  • [Php81] Handle crash on ArrowFunction attribute on FirstClassCallableRector (#​6313)
  • [Performance] Reduce double traverse on StrictNativeFunctionReturnTypeAnalyzer (#​6320)
  • [PhpParser] Alternative PR for findInstancesOfScoped() to keep existing performance (#​6324)
  • [CodingStyle] Use double quote to escape quotes in EncapsedStringsToSprintfRector (#​6326)
  • [TypeDeclaration] Handle crash on func call not found on BoolReturnTypeFromBooleanStrictReturnsRector (#​6327)
  • Fix first class callable to use combineAcceptors() to avoid assert Arg instance error (#​6330)
  • [Php81] Allow used as assign expr on ReadOnlyPropertyRector (#​6331)
  • Skip arrow function in scoped search (#​6333)
  • [TypeDeclaration] Better approach for native type check on ReturnStrictTypeAnalyzer (#​6343)
  • [DeadCode] Skip extension load append variable on RemoveAlwaysTrueIfConditionRector (#​6332)
  • [TypeDeclaration] Remove only void type on ReturnedNodesReturnTypeInfererTypeInferer (#​6340)
  • [DeadCode] Skip indirect next line definition of @​var on RemoveNonExistingVarAnnotationRector (#​6348)

rectorphp/rector-symfony 🎵

  • Added return type declaration rules for FormTypeInterface (#​670), Thanks @​stollr

rectorphp/rector-phpunit 🟢

  • [CodeQuality] Add NarrowSingleWillReturnCallbackRector (#​374)
  • [CodeQuality] Add SingleWithConsecutiveToWithRector (#​370)
  • [CodeQuality] Add NarrowIdenticalWithConsecutiveRector (#​369)
  • [CodeQuality] Add AddParentSetupCallOnSetupRector (#​364)
  • Include match() to invoke counting in WithConsecutiveRector (#​362)
  • Move WithConsecutiveRector to its PHPUnit100 namespace, CreateMockToAnonymousClassRector + PreferPHPUnitSelfCallRector to CodeQuality (#​360)
  • Add existing willReturnCallback() support to WithConsecutiveRector (#​358)

v1.2.5: Released Rector 1.2.5

Compare Source

New Features and Improvements 🥳

  • 20-30 % Rector speedup - Optimise checking the node types allowed for each rule (#​6232), Thanks @​carlos-granados!
  • [docs] Add help on the default process command (#​6226), Thanks @​94noni!
  • [TypeDeclaration] Adds AddClosureParamTypeFromArgRector (#​6258)
  • Adds AddClosureParamTypeFromObjectRector (#​6265), Thanks @​peterfox!
  • [Config] Improve ComposerJsonPhpVersionResolver API, make use of explicit php set files (#​6273)
  • [FileSystem] Add data and writable to not include on InitFilePathsResolver (#​6285)
  • always make paths absolute before processing files (#​6293), Thanks @​Kanti!

Bugfixes 🐛

  • [CodeQuality] Handle crash on first class callable inside match on OptionalParametersAfterRequiredRector (#​6263)
  • [ReturnTypeInferer] Drop this/static docblock type check on ReturnTypeInferer (#​6270)

Removed 💀

  • [deprecated] Remove deprecated ChangeAndIfToEarlyReturnRector, CallableThisArrayToAnonymousFunctionRector + casting rules (#​6276)
  • [deprecations] Remove deprecated GetClassToInstanceOfRector, UseIncrementAssignRector, DetectNodeCommand (#​6278)
  • [deprecated] Remove deprecated closure return rules, return type from strict bool/scalar returns (#​6287)


rectorphp/rector-symfony 🎵

  • Add Class_ annotation support to TemplateAnnotationToThisRenderRector (#​666)

rectorphp/rector-doctrine 🟠

  • Refactor the OrderByKeyToClassConstRector to use the new enum only in Criteria::orderBy method calls (#​336), Thanks @​julienfastre

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.

@renovate renovate bot added the renovate label Dec 14, 2024
Copy link
Author

renovate bot commented Dec 14, 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: api/composer.lock
Command failed: composer update rector/rector:2.0.9 --with-dependencies --ignore-platform-req='ext-*' --ignore-platform-req='lib-*' --no-ansi --no-interaction --no-scripts --no-autoloader --no-plugins
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.9 -> satisfiable by rector/rector[2.0.9].
    - rector/rector 2.0.9 requires phpstan/phpstan ^2.1.3 -> found phpstan/phpstan[2.1.3, 2.1.4] but it conflicts with your root composer.json require (1.11.11).

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

@renovate renovate bot force-pushed the renovate/rector-rector-2.x branch 2 times, most recently from df51872 to 4ce791e Compare December 31, 2024 16:33
@renovate renovate bot force-pushed the renovate/rector-rector-2.x branch from 4ce791e to 62bb499 Compare January 6, 2025 11:33
@renovate renovate bot force-pushed the renovate/rector-rector-2.x branch from 62bb499 to 9cd0c15 Compare January 19, 2025 13:09
@renovate renovate bot force-pushed the renovate/rector-rector-2.x branch 2 times, most recently from 98d2089 to ce3e9cf Compare February 10, 2025 10:10
@renovate renovate bot force-pushed the renovate/rector-rector-2.x branch from ce3e9cf to 2603a98 Compare February 10, 2025 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants