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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy