Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Commit 38d8f6a

Browse files
author
Teddy Roncin
committed
🐛 (User) fixed entity User
/users routes will now return all fields, even if they are empty (in this case there content will be null) Closes #28
1 parent ad786de commit 38d8f6a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Entity/User.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,22 @@
2727
'security' => "is_granted('ROLE_USER')",
2828
'pagination_items_per_page' => 10,
2929
],
30+
normalizationContext: [
31+
'skip_null_values' => false,
32+
],
3033
collectionOperations: [
3134
'get' => [
3235
'normalization_context' => [
3336
'groups' => ['user:read:some'],
37+
'skip_null_values' => false,
3438
],
3539
],
3640
],
3741
itemOperations: [
3842
'get' => [
3943
'normalization_context' => [
4044
'groups' => ['user:read:one'],
45+
'skip_null_values' => false,
4146
],
4247
],
4348
'delete' => [
@@ -50,6 +55,7 @@
5055
],
5156
'normalization_context' => [
5257
'groups' => ['user:read:one'],
58+
'skip_null_values' => false,
5359
],
5460
'security' => "object == user or is_granted('ROLE_ADMIN')",
5561
],

0 commit comments

Comments
 (0)