Skip to content

JsonValidateRector rule incorrectly preserves the associative argument #9623

@carlos-granados

Description

@carlos-granados

When the JsonValidateRector rule converts the json_decode function call to a json_validate function call, it incorrectly preserves the "associative" parameter if it is present. This is wrong because json_validate does not have an "associative" argument (it does not create json output, so this argument would be useless). This results in code which is either incorrect (passing the associative parameter to the flags argument) or an error if named arguments are used.

See https://getrector.com/demo/99b22fb6-f24a-485d-a5fe-e402ed53f886

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