Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6bfd145

Browse files
bug #46526 [Serializer] Added missing __call to TraceableEncoder (danielburger1337)
This PR was merged into the 6.1 branch. Discussion ---------- [Serializer] Added missing __call to TraceableEncoder | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | none | License | MIT | Doc PR | none Added missing `__call` method to the new TraceableEncoder. Commits ------- 424b9ff Added missing __call to TraceableEncoder
2 parents fd96959 + 424b9ff commit 6bfd145

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Symfony/Component/Serializer/Debug/TraceableEncoder.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,12 @@ public function needsNormalization(): bool
113113
{
114114
return !$this->encoder instanceof NormalizationAwareEncoder;
115115
}
116+
117+
/**
118+
* Proxies all method calls to the original encoder.
119+
*/
120+
public function __call(string $method, array $arguments): mixed
121+
{
122+
return $this->encoder->{$method}(...$arguments);
123+
}
116124
}

0 commit comments

Comments
 (0)