Skip to content

array_merge replacement when having functions as arguments #3329

@LiborStransky

Description

@LiborStransky

Bug Report

Subject Details
Rector version v0.7.22
Installed as composer dependency

replacing array_merge(x(), y()). where both methods return arrays with string keys results in:
[...y(), ...x()]; which is causing fatal error.

Minimal PHP Code Causing Issue

https://getrector.org/demo/9c4012b9-6ec1-451f-ac1e-b0e042afd27f#result

See https://3v4l.org/RCsYZ

Expected Behaviour

I think rector should skip that case in the solution is not easy.

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