Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DavidCasillasRivero opened this issue May 5, 2023 · 0 comments

Comments

@DavidCasillasRivero
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant