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

Commit 6d846a7

Browse files
author
Teddy Roncin
committed
🐛 (User and Group) Fixed issue #28 for Group. Improved fix for User
Group didn't return null values in requests. A line has been removed from User, because it was redondant (a general set of normalization_context in the call to ApiResource) Closes #28
1 parent 38d8f6a commit 6d846a7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Entity/Group.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,15 @@
3636
'get' => [
3737
'normalization_context' => [
3838
'groups' => ['group:read:some'],
39+
'skip_null_values' => false,
3940
],
4041
],
4142
'my_groups' => [
4243
'method' => 'GET',
4344
'path' => '/groups/me',
4445
'normalization_context' => [
4546
'groups' => ['group:read:some'],
47+
'skip_null_values' => false,
4648
],
4749
],
4850
'post' => [
@@ -51,13 +53,15 @@
5153
],
5254
'normalization_context' => [
5355
'groups' => ['group:read:one'],
56+
'skip_null_values' => false,
5457
],
5558
],
5659
],
5760
itemOperations: [
5861
'get' => [
5962
'normalization_context' => [
6063
'groups' => ['group:read:one'],
64+
'skip_null_values' => false,
6165
],
6266
],
6367
'delete' => [
@@ -70,6 +74,7 @@
7074
],
7175
'normalization_context' => [
7276
'groups' => ['group:read:one'],
77+
'skip_null_values' => false,
7378
],
7479
'security' => "is_granted('patch', object)",
7580
],

src/Entity/User.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
'security' => "is_granted('ROLE_USER')",
2828
'pagination_items_per_page' => 10,
2929
],
30-
normalizationContext: [
31-
'skip_null_values' => false,
32-
],
3330
collectionOperations: [
3431
'get' => [
3532
'normalization_context' => [

0 commit comments

Comments
 (0)