Skip to content

RenameAttributeRector did not rename attributes for constructor parameters #9269

@maMykola

Description

@maMykola

Bug Report

Subject Details
Rector version v2.1.2
PHP Version >= 8.0

The RenameAttributeRector rule did not replace attributes for constructor parameters.

Minimal PHP Code Causing Issue

https://getrector.com/demo/3135cc6d-1fd8-4401-8286-e447eec303ce

git clone git@github.com:maMykola/rector-rename-attribute.git
cd rector-rename-attribute
composer install
./vendor/bin/rector

Expected Behaviour

The #[Foo] attribute should be replaced with #[Bar].

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