Skip to content

Commit 8996d89

Browse files
committed
IBX-10063: Fixed incorrect key used to determinate sub-matcher class for denormalization
1 parent 99f0f71 commit 8996d89

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,12 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a
7777

7878
$compoundMatcher = new $compoundMatcherType($data['config'] ?? []);
7979
$subMatchers = [];
80-
foreach ($data['subMatchers'] ?? [] as $matcherType => $subMatcher) {
81-
$subMatchers[$matcherType] = $this->denormalizer->denormalize(
80+
foreach ($data['subMatchers'] ?? [] as $matcherKey => $subMatcher) {
81+
$subMatcherClass = $subMatcher['type'];
82+
83+
$subMatchers[$matcherKey] = $this->denormalizer->denormalize(
8284
$subMatcher,
83-
$matcherType,
85+
$subMatcherClass,
8486
$format,
8587
$context
8688
);

src/lib/MVC/Symfony/Component/Serializer/HostElementNormalizer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function normalize(
3333
array $context = []
3434
): array {
3535
return [
36+
'type' => $data::class,
3637
'elementNumber' => $data->getElementNumber(),
3738
'hostElements' => $data->getHostElements(),
3839
];

src/lib/MVC/Symfony/Component/Serializer/HostTextNormalizer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public function normalize(
2929
array $context = []
3030
): array {
3131
return [
32+
'type' => $data::class,
3233
'siteAccessesConfiguration' => $data->getSiteAccessesConfiguration(),
3334
];
3435
}

src/lib/MVC/Symfony/Component/Serializer/URIElementNormalizer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function normalize(
3333
array $context = []
3434
): array {
3535
return [
36+
'type' => $data::class,
3637
'elementNumber' => $data->getElementNumber(),
3738
'uriElements' => $data->getUriElements(),
3839
];

src/lib/MVC/Symfony/Component/Serializer/URITextNormalizer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public function normalize(
2929
array $context = []
3030
): array {
3131
return [
32+
'type' => $data::class,
3233
'siteAccessesConfiguration' => $data->getSiteAccessesConfiguration(),
3334
];
3435
}

0 commit comments

Comments
 (0)