Skip to content

Incorrect behavior of RemoveParentDelegatingConstructorRector #9658

@marcreichel

Description

@marcreichel

Bug Report

Subject Details
Rector version 2.3.6

When defining a constructor, where some parameters have attributes assigned, that may add some information (like Symfony\Component\DependencyInjection\Attribute\AutowireIterator for example), the constructor gets removed, which is wrong.

Minimal PHP Code Causing Issue

https://getrector.com/demo/e4d8c11d-fa5d-408c-904f-73eb3efec95f

Expected Behaviour

If an attribute is assigned to some parameters, the constructor should stay the same, because those attributes may add valuable/necessary information to the parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions