Skip to content

repeated "use" created #9188

@iyarchuk

Description

@iyarchuk

Bug Report

Subject Details
Rector version 2.0.16
PHP version 8.2.2

During migration from PHP 7 to PHP 8.4 get some files stuck with repeated "use" errors. For example:

Minimal PHP Code Causing Issue

use InvalidArgumentException;
use InvalidArgumentException;
use InvalidArgumentException;
(around 2k repeated rows)

https://getrector.com/demo/88c79af8-8f39-4c70-b5f4-b6b2bd12ebc1

Expected Behaviour

don't add repeated "use" in file

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