This repository was archived by the owner on Nov 6, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## [ 2.0.12] - 2020-12-10
2+ ### Changed
3+ - Headers from ` ApiResponse ` follow direct to client.
4+
15## [ 2.0.11] - 2020-09-16
26### Changed
37- For ` symfony/translation-contracts ` added support of the ` ^2.2 ` .
Original file line number Diff line number Diff line change 1515
1616use Psr \Log \LoggerAwareInterface ;
1717use Psr \Log \LoggerAwareTrait ;
18- use Symfony \Component \HttpKernel \Event \ResponseEvent ;
1918use Symfony \Component \HttpKernel \Event \ExceptionEvent ;
19+ use Symfony \Component \HttpKernel \Event \ResponseEvent ;
2020use Symfony \Component \OptionsResolver \Exception \ExceptionInterface ;
2121use Symfony \Contracts \Translation \TranslatorInterface ;
2222use Wakeapp \Bundle \ApiPlatformBundle \Dto \ApiDebugExceptionResultDto ;
2626use Wakeapp \Bundle \ApiPlatformBundle \Guesser \ApiErrorCodeGuesserInterface ;
2727use Wakeapp \Bundle \ApiPlatformBundle \HttpFoundation \ApiRequest ;
2828use Wakeapp \Bundle \ApiPlatformBundle \HttpFoundation \ApiResponse ;
29+
2930use function explode ;
3031use function sprintf ;
3132
@@ -179,6 +180,8 @@ public function onKernelResponse(ResponseEvent $event): void
179180 'message ' => $ message ,
180181 ]);
181182
182- $ event ->setResponse (new ApiResponse ($ resultDto ));
183+ $ headers = $ response ->headers ->all ();
184+
185+ $ event ->setResponse (new ApiResponse ($ resultDto , $ headers ));
183186 }
184187}
You can’t perform that action at this time.
0 commit comments