Skip to content

Breaking change in 5.0.11. Empty objects are now returned as arrays #687

@DavidCasillasRivero

Description

@DavidCasillasRivero

The changes in 5.0.11 break some funtionallity in our application. For example the response pasted below from our API changes the empty JSON object in the field_filters property to an array.

Debuging the Data/Obj.php class the property gets there as a PHP Std object. That was required until now so it was converted to an empty object an not an array , but now that is broken.

{
        "a8d887fd-1884-4c67-970a-988f3bcc6a52": {
            "id": "a8d887fd-1884-4c67-970a-988f3bcc6a52",
            "filter_label": "Default",
            "filter_sort": 0,
            "is_default": true,
            "field_filters": { }
        }
    }
{
        "a8d887fd-1884-4c67-970a-988f3bcc6a52": {
            "id": "a8d887fd-1884-4c67-970a-988f3bcc6a52",
            "filter_label": "Default",
            "filter_sort": 0,
            "is_default": true,
            "field_filters": []
        }
    }

Was this an expected change? In that case it should have been annotated as breaking change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions