Skip to content

Commit 41cf890

Browse files
committed
chore(api): switch from api-platform/hal-json to api-platform/hal
As recommended. This allows to remove cweagans/composer-patches.
1 parent d1df58a commit 41cf890

File tree

4 files changed

+82
-215
lines changed

4 files changed

+82
-215
lines changed

api/composer.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@
88
"api-platform/doctrine-orm": "4.2.3",
99
"api-platform/doctrine-common": "4.2.3",
1010
"api-platform/documentation": "4.2.6",
11+
"api-platform/hal": "4.2.6",
1112
"api-platform/http-cache": "4.2.6",
1213
"api-platform/json-api": "4.2.6",
13-
"api-platform/json-hal": "4.1.28",
1414
"api-platform/metadata": "4.2.6",
1515
"api-platform/openapi": "4.2.6",
1616
"api-platform/serializer": "4.2.6",
1717
"api-platform/state": "4.2.6",
1818
"api-platform/symfony": "4.2.6",
1919
"api-platform/validator": "4.2.6",
2020
"composer/package-versions-deprecated": "1.11.99",
21-
"cweagans/composer-patches": "2.0.0",
2221
"doctrine/common": "3.5.0",
2322
"doctrine/doctrine-bundle": "3.1.0",
2423
"doctrine/doctrine-migrations-bundle": "3.7.0",
@@ -91,7 +90,6 @@
9190
},
9291
"sort-packages": true,
9392
"allow-plugins": {
94-
"cweagans/composer-patches": true,
9593
"php-http/discovery": false,
9694
"symfony/flex": true,
9795
"symfony/runtime": true
@@ -160,13 +158,5 @@
160158
"conflict": {
161159
"symfony/dependency-injection": "5.3.7",
162160
"symfony/symfony": "*"
163-
},
164-
"extra": {
165-
"composer-exit-on-patch-failure": true,
166-
"patches": {
167-
"api-platform/json-hal": {
168-
"Allow NULL-Links": "patch/api-plattform-allow-null-links.patch"
169-
}
170-
}
171161
}
172162
}

api/composer.lock

Lines changed: 80 additions & 201 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/src/Serializer/SerializerContextBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public function createFromRequest(Request $request, bool $normalization, ?array
2222
$context = $this->decorated->createFromRequest($request, $normalization, $extractedAttributes);
2323

2424
if ($normalization) {
25+
$context['skip_null_to_one_relations'] = false;
2526
$context['skip_null_values'] = false;
2627
}
2728

api/symfony.lock

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
"composer/xdebug-handler": {
3838
"version": "1.4.6"
3939
},
40-
"cweagans/composer-patches": {
41-
"version": "1.7.1"
42-
},
4340
"dnoegel/php-xdg-base-dir": {
4441
"version": "v0.1.1"
4542
},

0 commit comments

Comments
 (0)