Skip to content

[RenameClassRector] Edge case - rename to class that already exists #1438

@JanMikes

Description

@JanMikes

Hey, it happened that i did not notice there is already class existing and renamed some other class that new name matched it as well:

Example:

services:
    Rector\Rector\Class_\RenameClassRector:
        GlamiImage: Glami\Image

But there is already class Glami\Image existing and autoloaded via composer.

I am curious if we should cover this edge case and add check if renaming class, whether other class already exists but i am afraid that rector is not aware of existing classes, what do you think?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions