You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor symfony#20877 [Serializer] (re)document PRESERVE_EMPTY_OBJECTS (94noni)
This PR was submitted for the 7.2 branch but it was squashed and merged into the 6.4 branch instead.
Discussion
----------
[Serializer] (re)document PRESERVE_EMPTY_OBJECTS
👋🏻
when implementing a web hook, I had to serialize en empty array as object, and found it was wrong (empty list not empty object)
```php
// json without flag
'data' => [],
"data":[],
// json with flag
'data' => new \ArrayObject(),
"data":{},
```
this PR (re)adds this feature as I thinks its useful to have it directly showcased in the main doc
weirdly it was present in v5.4 symfony#16977
Commits
-------
ce28629 [Serializer] (re)document PRESERVE_EMPTY_OBJECTS
0 commit comments