Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jun 24, 2025

This PR contains the following updates:

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

Release Notes

rectorphp/rector (rector/rector)

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


Configuration

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

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the renovate label Jun 24, 2025
@renovate renovate bot enabled auto-merge June 24, 2025 21:20
@renovate
Copy link
Contributor Author

renovate bot commented Jun 24, 2025

Branch automerge failure

This PR was configured for branch automerge. However, this is not possible, so it has been raised as a PR instead.

@renovate renovate bot added this pull request to the merge queue Jun 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Jun 24, 2025
@renovate renovate bot enabled auto-merge June 24, 2025 21:27
@renovate renovate bot force-pushed the renovate/rector-rector-2.x branch from edcb44a to f45ff3b Compare June 24, 2025 21:27
@renovate renovate bot force-pushed the renovate/rector-rector-2.x branch from f45ff3b to 28690d7 Compare June 26, 2025 16:14
@renovate renovate bot added this pull request to the merge queue Jun 26, 2025
Merged via the queue into devel with commit 7ce20bb Jun 26, 2025
53 checks passed
@renovate renovate bot deleted the renovate/rector-rector-2.x branch June 26, 2025 16:25
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.

1 participant