From 3b6a8fb4e32e2f4088d81ac1c99b51945e098c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gracjan=20J=C3=B3zefczyk?= Date: Tue, 25 Jun 2024 12:20:18 +0200 Subject: [PATCH] OP-334: Deprecated client fix --- src/Bridge/Przelewy24Bridge.php | 5 ++--- src/Resources/config/services/bridge.yml | 6 +++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Bridge/Przelewy24Bridge.php b/src/Bridge/Przelewy24Bridge.php index 5ef2413..fb57a92 100644 --- a/src/Bridge/Przelewy24Bridge.php +++ b/src/Bridge/Przelewy24Bridge.php @@ -10,8 +10,7 @@ namespace BitBag\SyliusPrzelewy24Plugin\Bridge; -use GuzzleHttp\ClientInterface as DeprecatedClientInterface; -use Psr\Http\Client\ClientInterface; +use GuzzleHttp\ClientInterface; final class Przelewy24Bridge implements Przelewy24BridgeInterface { @@ -22,7 +21,7 @@ final class Przelewy24Bridge implements Przelewy24BridgeInterface private string $environment = self::SANDBOX_ENVIRONMENT; public function __construct( - private ClientInterface|DeprecatedClientInterface $client, + private ClientInterface $client, ) { } diff --git a/src/Resources/config/services/bridge.yml b/src/Resources/config/services/bridge.yml index bc60fb5..ba22ad2 100644 --- a/src/Resources/config/services/bridge.yml +++ b/src/Resources/config/services/bridge.yml @@ -1,6 +1,10 @@ services: + bitbag_sylius_przelewy24_plugin.http_client: + class: GuzzleHttp\Client + public: false + bitbag_sylius_przelewy24_plugin.bridge.przelewy24: class: BitBag\SyliusPrzelewy24Plugin\Bridge\Przelewy24Bridge public: true arguments: - - "@sylius.http_client" + - "@bitbag_sylius_przelewy24_plugin.http_client"