Skip to content

Rector replaces the array with a callable where it shouldn't be replaced #9687

Closed as not planned

Description

@mspirkov

Bug Report

Subject Details
Rector version 2.3.8

Rector replaces the array with a callable where it shouldn't be replaced

Minimal PHP Code Causing Issue

https://getrector.com/demo/08ded2f2-958a-44a2-9af4-f3ac6a9c77ab

Expected Behaviour

The code does not change

Activity

  1. samsonasik commented on Mar 7, 2026

    @samsonasik
    Member

    This is kinda expected, I tried to cover this and as used in multiple cases, this is not solvable, see PR:

    I think for your use case, you can skip the rule for now :)

  2. mspirkov commented on Mar 8, 2026

    @mspirkov
    Author

    Thanks for the answer. I'll skip this rule then :)

  3. github-actions commented on Aug 30, 2026

    @github-actions
    Contributor

    This issue has been automatically locked because it has been closed for 150 days. Please open a new issue if you have a similar problem.

  4. locked as resolved and limited conversation to collaborators on Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions