From 10a172d234b3f24545b4b40a32835efb28408aa4 Mon Sep 17 00:00:00 2001 From: Pierre du Plessis Date: Thu, 26 Dec 2024 12:25:58 +0200 Subject: [PATCH] Handle existing reponses from Payum\Core\Bridge --- ReplyToSymfonyResponseConverter.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ReplyToSymfonyResponseConverter.php b/ReplyToSymfonyResponseConverter.php index 8383df0..9405a6a 100644 --- a/ReplyToSymfonyResponseConverter.php +++ b/ReplyToSymfonyResponseConverter.php @@ -2,7 +2,8 @@ namespace Payum\Bundle\PayumBundle; -use Payum\Bundle\PayumBundle\Reply\HttpResponse as SymfonyHttpResponse; +use Payum\Core\Bridge\Symfony\Reply\HttpResponse as CoreSymfonyHttpResponse; +use Payum\Core\Bridge\PayumBundle\Reply\HttpResponse as SymfonyHttpResponse; use Payum\Core\Exception\LogicException; use Payum\Core\Reply\HttpResponse; use Payum\Core\Reply\ReplyInterface; @@ -16,7 +17,7 @@ class ReplyToSymfonyResponseConverter */ public function convert(ReplyInterface $reply) { - if ($reply instanceof SymfonyHttpResponse) { + if ($reply instanceof SymfonyHttpResponse || $reply instanceof CoreSymfonyHttpResponse) { return $reply->getResponse(); } elseif ($reply instanceof HttpResponse) { $headers = $reply->getHeaders();