From 2f05119cc915a941c112f2bda1709668cd597843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20Mi=C4=99tek?= Date: Mon, 9 Oct 2023 10:01:12 +0200 Subject: [PATCH] Revert protected modificator for apiClient property and added getter for getSoapClient (5.x backward compatibility to access __getLastRequest and __getLastResponse for log purpose) --- src/GusApi/Client/GusApiClient.php | 5 +++++ src/GusApi/GusApi.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/GusApi/Client/GusApiClient.php b/src/GusApi/Client/GusApiClient.php index e91fd22..bb0b893 100644 --- a/src/GusApi/Client/GusApiClient.php +++ b/src/GusApi/Client/GusApiClient.php @@ -107,4 +107,9 @@ private function getRequestHeaders(string $action, string $to): array new \SoapHeader(self::ADDRESSING_NAMESPACE, 'To', $to), ]; } + + public function getSoapClient(): \SoapClient + { + return $this->soapClient; + } } diff --git a/src/GusApi/GusApi.php b/src/GusApi/GusApi.php index ed5614b..4c21705 100644 --- a/src/GusApi/GusApi.php +++ b/src/GusApi/GusApi.php @@ -33,7 +33,7 @@ class GusApi protected const SERVICE_TIME_ZONE = 'Europe/Warsaw'; protected const SERVICE_STATUS_DATE_FORMAT = 'd-m-Y'; - private GusApiClient $apiClient; + protected GusApiClient $apiClient; private string $sessionId; public function __construct(private string $userKey, string $env = 'prod', ?BuilderInterface $builder = null)