Skip to content

StringifyStrNeedlesRector rule applied multiple times #8992

@dmunk

Description

@dmunk

Bug Report

Subject Details
Rector version v. 2.0.6

StringifyStrNeedlesRector rule is applied whether it is needed or not. Subsequent runs on the same file will keep adding more (string) casts. I should note that it worked correctly for all other instances of needles in this codebase, so there must be something specific about the code (see Demo link below) that is causing the behavior.

Minimal PHP Code Causing Issue

Rector Demo

Expected Behaviour

Rector should skip this code after applying the first (string) cast.

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