From b7eedeaba0b2cb6d13a8eef4aaaa10298e04496f Mon Sep 17 00:00:00 2001 From: Olivier ALLAIN Date: Sat, 28 Jan 2023 21:58:31 +0100 Subject: [PATCH] fix Symfony Request type change --- src/Controller/CancelPayPalCheckoutPaymentAction.php | 1 + src/Controller/CancelPayPalOrderAction.php | 1 + src/Controller/CancelPayPalPaymentAction.php | 1 + src/Controller/PayPalPaymentOnErrorAction.php | 1 + src/Controller/Webhook/RefundOrderAction.php | 1 + src/Onboarding/Initiator/OnboardingInitiator.php | 6 ++++++ 6 files changed, 11 insertions(+) diff --git a/src/Controller/CancelPayPalCheckoutPaymentAction.php b/src/Controller/CancelPayPalCheckoutPaymentAction.php index ad53d03d..4f3b3da1 100644 --- a/src/Controller/CancelPayPalCheckoutPaymentAction.php +++ b/src/Controller/CancelPayPalCheckoutPaymentAction.php @@ -26,6 +26,7 @@ public function __construct( public function __invoke(Request $request): Response { + /** @psalm-suppress RedundantCastGivenDocblockType */ $content = (array) json_decode((string) $request->getContent(false), true); $payment = $this->paymentProvider->getByPayPalOrderId((string) $content['payPalOrderId']); diff --git a/src/Controller/CancelPayPalOrderAction.php b/src/Controller/CancelPayPalOrderAction.php index a2c1dcd1..15e655e3 100644 --- a/src/Controller/CancelPayPalOrderAction.php +++ b/src/Controller/CancelPayPalOrderAction.php @@ -37,6 +37,7 @@ public function __construct( public function __invoke(Request $request): Response { + /** @psalm-suppress RedundantCastGivenDocblockType */ $content = (array) json_decode((string) $request->getContent(false), true); $payment = $this->paymentProvider->getByPayPalOrderId((string) $content['payPalOrderId']); diff --git a/src/Controller/CancelPayPalPaymentAction.php b/src/Controller/CancelPayPalPaymentAction.php index 125f043b..e17b1fbc 100644 --- a/src/Controller/CancelPayPalPaymentAction.php +++ b/src/Controller/CancelPayPalPaymentAction.php @@ -48,6 +48,7 @@ public function __construct( public function __invoke(Request $request): Response { + /** @psalm-suppress RedundantCastGivenDocblockType */ $content = (array) json_decode((string) $request->getContent(false), true); $payment = $this->paymentProvider->getByPayPalOrderId((string) $content['payPalOrderId']); diff --git a/src/Controller/PayPalPaymentOnErrorAction.php b/src/Controller/PayPalPaymentOnErrorAction.php index c3ddb52b..b8915ea6 100644 --- a/src/Controller/PayPalPaymentOnErrorAction.php +++ b/src/Controller/PayPalPaymentOnErrorAction.php @@ -29,6 +29,7 @@ public function __construct(FlashBagInterface|RequestStack $flashBagOrRequestSta public function __invoke(Request $request): Response { + /** @psalm-suppress RedundantCastGivenDocblockType */ $this->logger->error((string) $request->getContent()); FlashBagProvider::getFlashBag($this->flashBagOrRequestStack) ->add('error', 'sylius.pay_pal.something_went_wrong') diff --git a/src/Controller/Webhook/RefundOrderAction.php b/src/Controller/Webhook/RefundOrderAction.php index 67e9d465..8a47e17b 100644 --- a/src/Controller/Webhook/RefundOrderAction.php +++ b/src/Controller/Webhook/RefundOrderAction.php @@ -62,6 +62,7 @@ public function __invoke(Request $request): Response private function getPayPalPaymentUrl(Request $request): string { + /** @psalm-suppress RedundantCastGivenDocblockType */ $content = (array) json_decode((string) $request->getContent(false), true); Assert::keyExists($content, 'resource'); $resource = (array) $content['resource']; diff --git a/src/Onboarding/Initiator/OnboardingInitiator.php b/src/Onboarding/Initiator/OnboardingInitiator.php index 348ec3f5..b62eaed7 100644 --- a/src/Onboarding/Initiator/OnboardingInitiator.php +++ b/src/Onboarding/Initiator/OnboardingInitiator.php @@ -16,8 +16,14 @@ final class OnboardingInitiator implements OnboardingInitiatorInterface private string $createPartnerReferralsUrl; + /** + * @psalm-suppress DeprecatedClass + */ private Security $security; + /** + * @psalm-suppress DeprecatedClass + */ public function __construct(UrlGeneratorInterface $urlGenerator, Security $security, string $facilitatorUrl) { $this->urlGenerator = $urlGenerator;