Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
webeweb committed Apr 29, 2024
1 parent 16ac579 commit 4730727
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 41 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"ext-json": "*",
"guzzlehttp/guzzle": "^6.0|^7.0",
"psr/log": "^1.0|^2.0|^3.0",
"webeweb/core-library": "^8.0"
"symfony/yaml": "^4.4|^5.0|^6.0",
"webeweb/core-library": "^9.0"
},
"require-dev": {
"phpstan/extension-installer": "^1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/Model/SentSmsMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
namespace WBW\Library\SmsMode\Model;

use DateTime;
use WBW\Library\Common\Traits\Strings\StringMessageTrait;
use WBW\Library\SmsMode\Response\AbstractResponse;
use WBW\Library\SmsMode\Traits\Strings\StringNumeroTrait;
use WBW\Library\SmsMode\Traits\Strings\StringSmsIDTrait;
use WBW\Library\Traits\Strings\StringMessageTrait;

/**
* Sent SMS message.
Expand Down
6 changes: 3 additions & 3 deletions src/Model/SmsReply.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
namespace WBW\Library\SmsMode\Model;

use DateTime;
use WBW\Library\Common\Traits\Strings\StringFromTrait;
use WBW\Library\Common\Traits\Strings\StringTextTrait;
use WBW\Library\Common\Traits\Strings\StringToTrait;
use WBW\Library\SmsMode\Response\AbstractResponse;
use WBW\Library\SmsMode\Traits\Strings\StringResponseIDTrait;
use WBW\Library\Traits\Strings\StringFromTrait;
use WBW\Library\Traits\Strings\StringTextTrait;
use WBW\Library\Traits\Strings\StringToTrait;

/**
* SMS reply.
Expand Down
2 changes: 1 addition & 1 deletion src/Model/SmsReplyCallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace WBW\Library\SmsMode\Model;

use WBW\Library\Common\Traits\Strings\StringMessageTrait;
use WBW\Library\SmsMode\Api\SmsReplyCallbackInterface;
use WBW\Library\SmsMode\Response\AbstractResponse;
use WBW\Library\SmsMode\Traits\DateTimes\DateTimeDateReceptionTrait;
Expand All @@ -21,7 +22,6 @@
use WBW\Library\SmsMode\Traits\Strings\StringRefClientTrait;
use WBW\Library\SmsMode\Traits\Strings\StringResponseIDTrait;
use WBW\Library\SmsMode\Traits\Strings\StringSmsIDTrait;
use WBW\Library\Traits\Strings\StringMessageTrait;

/**
* SMS reply callback.
Expand Down
10 changes: 5 additions & 5 deletions src/Provider/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
use InvalidArgumentException;
use Psr\Log\LoggerInterface;
use Throwable;
use WBW\Library\Provider\AbstractProvider as BaseProvider;
use WBW\Library\Provider\Exception\ApiException;
use WBW\Library\Common\Helper\ArrayHelper;
use WBW\Library\Common\Provider\AbstractProvider as BaseProvider;
use WBW\Library\Common\Provider\ProviderException;
use WBW\Library\SmsMode\Model\Authentication;
use WBW\Library\SmsMode\Request\AbstractRequest;
use WBW\Library\SmsMode\Serializer\RequestSerializer;
use WBW\Library\Types\Helper\ArrayHelper;

/**
* Abstract provider.
Expand Down Expand Up @@ -93,7 +93,7 @@ private function buildConfiguration(): array {
* @param mixed[] $postData The post data.
* @return string Returns the raw response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
protected function callApi(AbstractRequest $request, array $queryData, array $postData = []): string {

Expand Down Expand Up @@ -122,7 +122,7 @@ protected function callApi(AbstractRequest $request, array $queryData, array $po
throw $ex;
} catch (Throwable $ex) {

throw new ApiException("Call sMsmode API failed", 500, $ex);
throw new ProviderException("Call sMsmode API failed", 500, $ex);
}
}

Expand Down
34 changes: 17 additions & 17 deletions src/Provider/ApiProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

use GuzzleHttp\Exception\ClientException;
use InvalidArgumentException;
use WBW\Library\Provider\Exception\ApiException;
use WBW\Library\Common\Provider\ProviderException;
use WBW\Library\SmsMode\Request\AccountBalanceRequest;
use WBW\Library\SmsMode\Request\AddingContactRequest;
use WBW\Library\SmsMode\Request\CheckingSmsMessageStatusRequest;
Expand Down Expand Up @@ -62,7 +62,7 @@ class ApiProvider extends AbstractProvider {
* @param AccountBalanceRequest $request The account balance request.
* @return AccountBalanceResponse Returns the account balance response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function accountBalance(AccountBalanceRequest $request): AccountBalanceResponse {

Expand All @@ -79,7 +79,7 @@ public function accountBalance(AccountBalanceRequest $request): AccountBalanceRe
* @param AddingContactRequest $request The adding contact request.
* @return AddingContactResponse Returns the adding contact response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function addingContact(AddingContactRequest $request): AddingContactResponse {

Expand All @@ -96,7 +96,7 @@ public function addingContact(AddingContactRequest $request): AddingContactRespo
* @param CheckingSmsMessageStatusRequest $request The checking SMS message status request.
* @return CheckingSmsMessageStatusResponse Returns the checking SMS message status response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function checkingSmsMessageStatus(CheckingSmsMessageStatusRequest $request): CheckingSmsMessageStatusResponse {

Expand All @@ -113,7 +113,7 @@ public function checkingSmsMessageStatus(CheckingSmsMessageStatusRequest $reques
* @param CreatingApiKeyRequest $request The creating API key request.
* @return CreatingApiKeyResponse Returns the creating API key response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function creatingApiKey(CreatingApiKeyRequest $request): CreatingApiKeyResponse {

Expand All @@ -122,7 +122,7 @@ public function creatingApiKey(CreatingApiKeyRequest $request): CreatingApiKeyRe
try {

$rawResponse = $this->callApi($request, $queryData);
} catch (ApiException $ex) {
} catch (ProviderException $ex) {

$previous = $ex->getPrevious();
if (false === ($previous instanceof ClientException)) {
Expand All @@ -141,7 +141,7 @@ public function creatingApiKey(CreatingApiKeyRequest $request): CreatingApiKeyRe
* @param CreatingSubAccountRequest $request The creating sub-account request.
* @return CreatingSubAccountResponse Returns the creating sub-account response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function creatingSubAccount(CreatingSubAccountRequest $request): CreatingSubAccountResponse {

Expand All @@ -158,7 +158,7 @@ public function creatingSubAccount(CreatingSubAccountRequest $request): Creating
* @param DeletingSmsRequest $request The deleting SMS request.
* @return DeletingSmsResponse Returns the delivery SMS message response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function deletingSms(DeletingSmsRequest $request): DeletingSmsResponse {

Expand All @@ -175,7 +175,7 @@ public function deletingSms(DeletingSmsRequest $request): DeletingSmsResponse {
* @param DeletingSubAccountRequest $request The deleting sub-account request.
* @return DeletingSubAccountResponse Returns the delivery sub-account response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function deletingSubAccount(DeletingSubAccountRequest $request): DeletingSubAccountResponse {

Expand All @@ -192,7 +192,7 @@ public function deletingSubAccount(DeletingSubAccountRequest $request): Deleting
* @param DeliveryReportRequest $request The delivery report request.
* @return DeliveryReportResponse Returns the delivery report response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function deliveryReport(DeliveryReportRequest $request): DeliveryReportResponse {

Expand All @@ -209,7 +209,7 @@ public function deliveryReport(DeliveryReportRequest $request): DeliveryReportRe
* @param RetrievingSmsReplyRequest $request The retrieving SMS reply request.
* @return RetrievingSmsReplyResponse Returns the retrieving SMS reply response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function retrievingSmsReply(RetrievingSmsReplyRequest $request): RetrievingSmsReplyResponse {

Expand All @@ -226,7 +226,7 @@ public function retrievingSmsReply(RetrievingSmsReplyRequest $request): Retrievi
* @param SendingSmsBatchRequest $request The sending SMS batch request.
* @return SendingSmsBatchResponse Returns the sending SMS message response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function sendingSmsBatch(SendingSmsBatchRequest $request): SendingSmsBatchResponse {

Expand Down Expand Up @@ -254,7 +254,7 @@ public function sendingSmsBatch(SendingSmsBatchRequest $request): SendingSmsBatc
* @param SendingSmsMessageRequest $request The sending SMS message request.
* @return SendingSmsMessageResponse Returns the sending SMS message response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function sendingSmsMessage(SendingSmsMessageRequest $request): SendingSmsMessageResponse {

Expand All @@ -277,7 +277,7 @@ public function sendingSmsMessage(SendingSmsMessageRequest $request): SendingSms
* @param SendingTextToSpeechSmsRequest $request The sending text-to-speech SMS request.
* @return SendingTextToSpeechSmsResponse Returns the sending text-to-speech response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function sendingTextToSpeechSms(SendingTextToSpeechSmsRequest $request): SendingTextToSpeechSmsResponse {

Expand All @@ -300,7 +300,7 @@ public function sendingTextToSpeechSms(SendingTextToSpeechSmsRequest $request):
* @param SendingUnicodeSmsRequest $request The sending unicode SMS request.
* @return SendingUnicodeSmsResponse Returns the sending unicode response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function sendingUnicodeSms(SendingUnicodeSmsRequest $request): SendingUnicodeSmsResponse {

Expand All @@ -323,7 +323,7 @@ public function sendingUnicodeSms(SendingUnicodeSmsRequest $request): SendingUni
* @param SentSmsMessageListRequest $request The sent SMS message list request.
* @return SentSmsMessageListResponse Returns the sent SMS message list response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function sentSmsMessageList(SentSmsMessageListRequest $request): SentSmsMessageListResponse {

Expand All @@ -340,7 +340,7 @@ public function sentSmsMessageList(SentSmsMessageListRequest $request): SentSmsM
* @param TransferringCreditsRequest $request The transferring credits request.
* @return TransferringCreditsResponse Returns the transferring credits response.
* @throws InvalidArgumentException Throws an invalid argument exception if a parameter is missing.
* @throws ApiException Throws an API exception if an error occurs.
* @throws ProviderException Throws a provider exception if an error occurs.
*/
public function transferringCredits(TransferringCreditsRequest $request): TransferringCreditsResponse {

Expand Down
2 changes: 1 addition & 1 deletion src/Request/AddingContactRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
namespace WBW\Library\SmsMode\Request;

use UnexpectedValueException;
use WBW\Library\Common\Traits\DateTimes\DateTimeDateTrait;
use WBW\Library\SmsMode\Serializer\NumeroSerializer;
use WBW\Library\SmsMode\Traits\Strings\StringMobileTrait;
use WBW\Library\SmsMode\Traits\Strings\StringNomTrait;
use WBW\Library\SmsMode\Traits\Strings\StringPrenomTrait;
use WBW\Library\SmsMode\Traits\Strings\StringSocieteTrait;
use WBW\Library\Traits\DateTimes\DateTimeDateTrait;

/**
* Adding contact request.
Expand Down
6 changes: 3 additions & 3 deletions src/Request/CreatingSubAccountRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
namespace WBW\Library\SmsMode\Request;

use UnexpectedValueException;
use WBW\Library\Common\Traits\DateTimes\DateTimeDateTrait;
use WBW\Library\Common\Traits\Strings\StringEmailTrait;
use WBW\Library\Common\Traits\Strings\StringReferenceTrait;
use WBW\Library\SmsMode\Serializer\NumeroSerializer;
use WBW\Library\SmsMode\Traits\Strings\StringMobileTrait;
use WBW\Library\SmsMode\Traits\Strings\StringNomTrait;
use WBW\Library\SmsMode\Traits\Strings\StringPrenomTrait;
use WBW\Library\SmsMode\Traits\Strings\StringSocieteTrait;
use WBW\Library\Traits\DateTimes\DateTimeDateTrait;
use WBW\Library\Traits\Strings\StringEmailTrait;
use WBW\Library\Traits\Strings\StringReferenceTrait;

/**
* Creating sub-account request.
Expand Down
2 changes: 1 addition & 1 deletion src/Request/SendingSmsMessageRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use InvalidArgumentException;
use UnexpectedValueException;
use WBW\Library\Common\Traits\Strings\StringMessageTrait;
use WBW\Library\SmsMode\Api\SendingSmsMessageInterface;
use WBW\Library\SmsMode\Serializer\NumeroSerializer;
use WBW\Library\SmsMode\Traits\DateTimes\DateTimeDateEnvoiTrait;
Expand All @@ -23,7 +24,6 @@
use WBW\Library\SmsMode\Traits\Strings\StringEmetteurTrait;
use WBW\Library\SmsMode\Traits\Strings\StringNotificationUrlTrait;
use WBW\Library\SmsMode\Traits\Strings\StringRefClientTrait;
use WBW\Library\Traits\Strings\StringMessageTrait;

/**
* Sending SMS message request.
Expand Down
2 changes: 1 addition & 1 deletion src/Request/SendingTextToSpeechSmsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

use InvalidArgumentException;
use UnexpectedValueException;
use WBW\Library\Common\Traits\Strings\StringMessageTrait;
use WBW\Library\SmsMode\Api\SendingTextToSpeechSmsInterface;
use WBW\Library\SmsMode\Serializer\NumeroSerializer;
use WBW\Library\SmsMode\Traits\DateTimes\DateTimeDateEnvoiTrait;
use WBW\Library\Traits\Strings\StringMessageTrait;

/**
* Sending text-to-speech SMS request.
Expand Down
2 changes: 1 addition & 1 deletion src/Request/TransferringCreditsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace WBW\Library\SmsMode\Request;

use WBW\Library\Traits\Strings\StringReferenceTrait;
use WBW\Library\Common\Traits\Strings\StringReferenceTrait;

/**
* Transferring credits request.
Expand Down
6 changes: 3 additions & 3 deletions src/Response/AbstractResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

namespace WBW\Library\SmsMode\Response;

use WBW\Library\Provider\Response\AbstractResponse as BaseResponse;
use WBW\Library\Common\Provider\AbstractResponse as BaseResponse;
use WBW\Library\Common\Traits\Integers\IntegerCodeTrait;
use WBW\Library\Common\Traits\Strings\StringDescriptionTrait;
use WBW\Library\SmsMode\Api\ResponseInterface;
use WBW\Library\Traits\Integers\IntegerCodeTrait;
use WBW\Library\Traits\Strings\StringDescriptionTrait;

/**
* Abstract response.
Expand Down
2 changes: 1 addition & 1 deletion src/Response/CreatingApiKeyResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
namespace WBW\Library\SmsMode\Response;

use DateTime;
use WBW\Library\Common\Traits\Strings\StringIdTrait;
use WBW\Library\SmsMode\Traits\Strings\StringAccessTokenTrait;
use WBW\Library\Traits\Strings\StringIdTrait;

/**
* Creating API key response.
Expand Down
2 changes: 1 addition & 1 deletion src/Serializer/RequestSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
use DateTime;
use InvalidArgumentException;
use Symfony\Component\Yaml\Yaml;
use WBW\Library\Common\Helper\ArrayHelper;
use WBW\Library\SmsMode\Api\RequestInterface;
use WBW\Library\Types\Helper\ArrayHelper;

/**
* Request serializer.
Expand Down
2 changes: 1 addition & 1 deletion src/Serializer/ResponseDeserializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace WBW\Library\SmsMode\Serializer;

use DateTime;
use WBW\Library\Common\Helper\ArrayHelper;
use WBW\Library\SmsMode\Api\ResponseInterface;
use WBW\Library\SmsMode\Model\DeliveryReport;
use WBW\Library\SmsMode\Model\SentSmsMessage;
Expand All @@ -34,7 +35,6 @@
use WBW\Library\SmsMode\Response\SendingUnicodeSmsResponse;
use WBW\Library\SmsMode\Response\SentSmsMessageListResponse;
use WBW\Library\SmsMode\Response\TransferringCreditsResponse;
use WBW\Library\Types\Helper\ArrayHelper;

/**
* Response deserializer.
Expand Down

0 comments on commit 4730727

Please sign in to comment.