Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Commitabc5d28
committed
minor#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 docweirdly it was present in v5.4#16977Commits-------ce28629 [Serializer] (re)document PRESERVE_EMPTY_OBJECTS1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1571 | 1571 | | |
1572 | 1572 | | |
1573 | 1573 | | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
1574 | 1581 | | |
1575 | 1582 | | |
1576 | 1583 | | |
| |||
0 commit comments
Comments
(0)