8000 bug #49186 [Serializer] Improve exception message in UnwrappingDenorm… · symfony/symfony@e4bd593 · GitHub
[go: up one dir, main page]

Skip to content

Commit e4bd593

Browse files
committed
bug #49186 [Serializer] Improve exception message in UnwrappingDenormalizer (andersonamuller)
This PR was submitted for the 7.1 branch but it was squashed and merged into the 6.4 branch instead. Discussion ---------- [Serializer] Improve exception message in UnwrappingDenormalizer | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - The current code expects the path to be replaced in the message, but probably it was forgotten. Commits ------- 3c96bfb [Serializer] Improve exception message in UnwrappingDenormalizer
2 parents b49df79 + 3c96bfb commit e4bd593

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Serializer/Context/Normalizer/UnwrappingDenormalizerContextBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function withUnwrapPath(?string $unwrapPath): static
4545
try {
4646
new PropertyPath($unwrapPath);
4747
} catch (InvalidPropertyPathException $e) {
48-
throw new InvalidArgumentException('The "%s" property path is not valid.', previous: $e);
48+
throw new InvalidArgumentException(sprintf('The "%s" property path is not valid.', $unwrapPath), previous: $e);
4949
}
5050

5151
return $this->with(UnwrappingDenormalizer::UNWRAP_PATH, $unwrapPath);

0 commit comments

Comments
 (0)
0