diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1657a68..e5ea526 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,6 +10,9 @@ on: - main - master +permissions: + contents: read + jobs: tests: name: PHP ${{ matrix.php }} @@ -49,5 +52,8 @@ jobs: - name: Install dependencies run: composer update --prefer-dist --no-interaction + - name: Audit dependencies + run: composer audit || true + - name: Running unit tests run: php vendor/bin/phpunit --configuration tests-resources/phpunit.dist.xml --testsuite unit diff --git a/CHANGELOG.md b/CHANGELOG.md index 190eb08..0ced20b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [4.0.0] - 2026-04-09 +### Removed +- deprecated `\Smsapi\Client\Feature\Contacts\Bag\CreateContactBag::withPhone` +- deprecated `\Smsapi\Client\Feature\Sms\Bag\ScheduleSmsBag::setIdx` +- deprecated `\Smsapi\Client\Feature\Sms\Bag\SendSmsToGroupBag::setIdx` +- deprecated `\Smsapi\Client\Feature\Sms\Bag\ScheduleSmsToGroupBag::setIdx` +- deprecated `\Smsapi\Client\Curl\Exception\RequestException` +- deprecated `\Smsapi\Client\Curl\Exception\NetworkException` +- deprecated `\Smsapi\Client\Curl\Exception\ClientException` + +## Changed +- method signature `\Smsapi\Client\Feature\Contacts\ContactsFeature::findContacts` +- method signature `\Smsapi\Client\Feature\Sms\Bag\ScheduleSmsBag::setExternalId` +- method signature `\Smsapi\Client\Feature\Sms\Bag\ScheduleSmssBag::setExternalId` +- method signature `\Smsapi\Client\Feature\Sms\Bag\ScheduleSmsToGroupBag::setExternalId` +- method signature `\Smsapi\Client\Feature\Sms\Bag\SendSmsBag::setExternalId` +- method signature `\Smsapi\Client\Feature\Sms\Bag\SendSmssBag::setExternalId` +- method signature `\Smsapi\Client\Feature\Sms\Bag\SendSmsToGroupBag::setExternalId` + ## [3.0.13] - 2026-01-12 ### Added - PHP-8.5 support diff --git a/build/php-7.1/Dockerfile b/build/php-7.1/Dockerfile index 690c835..2a0487e 100644 --- a/build/php-7.1/Dockerfile +++ b/build/php-7.1/Dockerfile @@ -3,14 +3,7 @@ FROM php:7.1-cli-alpine RUN apk update && \ apk upgrade && \ - apk add --no-cache \ - autoconf \ - g++ \ - make - -RUN pecl install xdebug-2.9.8 && \ - pecl clear-cache && \ - docker-php-ext-enable xdebug + apk add --no-cache make COPY --from=composer /usr/bin/composer /usr/bin/composer diff --git a/build/php-7.2/Dockerfile b/build/php-7.2/Dockerfile index 0876175..bd7b230 100644 --- a/build/php-7.2/Dockerfile +++ b/build/php-7.2/Dockerfile @@ -3,14 +3,7 @@ FROM php:7.2-cli-alpine RUN apk update && \ apk upgrade && \ - apk add --no-cache \ - autoconf \ - g++ \ - make - -RUN pecl install xdebug-2.9.8 && \ - pecl clear-cache && \ - docker-php-ext-enable xdebug + apk add --no-cache make COPY --from=composer /usr/bin/composer /usr/bin/composer diff --git a/build/php-7.3/Dockerfile b/build/php-7.3/Dockerfile index e2dee2e..28ef4fc 100644 --- a/build/php-7.3/Dockerfile +++ b/build/php-7.3/Dockerfile @@ -3,14 +3,7 @@ FROM php:7.3-cli-alpine RUN apk update && \ apk upgrade && \ - apk add --no-cache \ - autoconf \ - g++ \ - make - -RUN pecl install xdebug-2.9.8 && \ - pecl clear-cache && \ - docker-php-ext-enable xdebug + apk add --no-cache make COPY --from=composer /usr/bin/composer /usr/bin/composer diff --git a/build/php-7.4/Dockerfile b/build/php-7.4/Dockerfile index 24a17d3..d810922 100644 --- a/build/php-7.4/Dockerfile +++ b/build/php-7.4/Dockerfile @@ -3,14 +3,7 @@ FROM php:7.4-cli-alpine RUN apk update && \ apk upgrade && \ - apk add --no-cache \ - autoconf \ - g++ \ - make - -RUN pecl install xdebug-2.9.8 && \ - pecl clear-cache && \ - docker-php-ext-enable xdebug + apk add --no-cache make COPY --from=composer /usr/bin/composer /usr/bin/composer diff --git a/build/php-8.0/Dockerfile b/build/php-8.0/Dockerfile index b75744e..04a6435 100644 --- a/build/php-8.0/Dockerfile +++ b/build/php-8.0/Dockerfile @@ -3,14 +3,7 @@ FROM php:8.0-cli-alpine RUN apk update && \ apk upgrade && \ - apk add --no-cache \ - autoconf \ - g++ \ - make - -RUN pecl install xdebug-3.1.6 && \ - pecl clear-cache && \ - docker-php-ext-enable xdebug + apk add --no-cache make COPY --from=composer /usr/bin/composer /usr/bin/composer diff --git a/build/php-8.1/Dockerfile b/build/php-8.1/Dockerfile index a68b5e2..70aea88 100644 --- a/build/php-8.1/Dockerfile +++ b/build/php-8.1/Dockerfile @@ -3,14 +3,7 @@ FROM php:8.1-cli-alpine RUN apk update && \ apk upgrade && \ - apk add --no-cache \ - autoconf \ - g++ \ - make - -RUN pecl install xdebug-3.1.6 && \ - pecl clear-cache && \ - docker-php-ext-enable xdebug + apk add --no-cache make COPY --from=composer /usr/bin/composer /usr/bin/composer diff --git a/build/php-8.2/Dockerfile b/build/php-8.2/Dockerfile index 9092d51..677d0ad 100644 --- a/build/php-8.2/Dockerfile +++ b/build/php-8.2/Dockerfile @@ -3,15 +3,7 @@ FROM php:8.2-cli-alpine RUN apk update && \ apk upgrade && \ - apk add --no-cache \ - autoconf \ - g++ \ - make \ - linux-headers - -RUN pecl install xdebug-3.2.2 && \ - pecl clear-cache && \ - docker-php-ext-enable xdebug + apk add --no-cache make COPY --from=composer /usr/bin/composer /usr/bin/composer diff --git a/build/php-8.3/Dockerfile b/build/php-8.3/Dockerfile index 97fdde4..94ac096 100644 --- a/build/php-8.3/Dockerfile +++ b/build/php-8.3/Dockerfile @@ -3,15 +3,7 @@ FROM php:8.3-cli-alpine RUN apk update && \ apk upgrade && \ - apk add --no-cache \ - autoconf \ - g++ \ - make \ - linux-headers - -RUN pecl install xdebug-3.3.1 && \ - pecl clear-cache && \ - docker-php-ext-enable xdebug + apk add --no-cache make COPY --from=composer /usr/bin/composer /usr/bin/composer diff --git a/build/php-8.4/Dockerfile b/build/php-8.4/Dockerfile index 30effb1..ba691e0 100644 --- a/build/php-8.4/Dockerfile +++ b/build/php-8.4/Dockerfile @@ -3,15 +3,7 @@ FROM php:8.4-cli-alpine RUN apk update && \ apk upgrade && \ - apk add --no-cache \ - autoconf \ - g++ \ - make \ - linux-headers - -RUN pecl install xdebug-3.4.4 && \ - pecl clear-cache && \ - docker-php-ext-enable xdebug + apk add --no-cache make COPY --from=composer /usr/bin/composer /usr/bin/composer diff --git a/composer.json b/composer.json index dd8d42e..8c5dad5 100644 --- a/composer.json +++ b/composer.json @@ -32,8 +32,7 @@ "phpdocumentor/reflection-docblock": "^4.3 || ^5.2.0", "phpdocumentor/type-resolver": "^0.5 || ^1.3.0", "guzzlehttp/psr7": "^1 || ^2", - "ext-curl": "*", - "roave/security-advisories": "dev-latest" + "ext-curl": "*" }, "suggest": { "ext-curl": "To use Curl HttpClient", diff --git a/src/Curl/Exception/ClientException.php b/src/Curl/Exception/ClientException.php deleted file mode 100644 index 0d2726a..0000000 --- a/src/Curl/Exception/ClientException.php +++ /dev/null @@ -1,17 +0,0 @@ -restRequestExecutor->read('contacts', (array)$findContactsBag); diff --git a/src/Feature/Sms/Bag/ScheduleSmsBag.php b/src/Feature/Sms/Bag/ScheduleSmsBag.php index 2ce4b52..a19332c 100644 --- a/src/Feature/Sms/Bag/ScheduleSmsBag.php +++ b/src/Feature/Sms/Bag/ScheduleSmsBag.php @@ -68,25 +68,13 @@ public function setParams(array $params): self } /** - * @todo method signature to be changed in next major release as implicitly marking parameter as nullable is deprecated since PHP 8.4 + * @param bool|null $checkIdx */ - public function setExternalId(string $idx, bool $checkIdx = null): self + public function setExternalId(string $idx, $checkIdx = null): self { $this->idx = [$idx]; $this->checkIdx = $checkIdx; return $this; } - - /** - * @deprecated - * @see ScheduleSmsBag::setExternalId() - */ - public function setIdx(array $idx, bool $checkIdx = null): self - { - $this->idx = $idx; - $this->checkIdx = $checkIdx; - - return $this; - } } diff --git a/src/Feature/Sms/Bag/ScheduleSmsToGroupBag.php b/src/Feature/Sms/Bag/ScheduleSmsToGroupBag.php index 0981fd2..ec69498 100644 --- a/src/Feature/Sms/Bag/ScheduleSmsToGroupBag.php +++ b/src/Feature/Sms/Bag/ScheduleSmsToGroupBag.php @@ -56,25 +56,13 @@ public static function withTemplateName(DateTimeInterface $scheduleAt, string $g } /** - * @todo method signature to be changed in next major release as implicitly marking parameter as nullable is deprecated since PHP 8.4 + * @param bool|null $checkIdx */ - public function setExternalId(string $idx, bool $checkIdx = null): self + public function setExternalId(string $idx, $checkIdx = null): self { $this->idx = [$idx]; $this->checkIdx = $checkIdx; return $this; } - - /** - * @deprecated - * @see ScheduleSmsToGroupBag::setExternalId() - */ - public function setIdx(array $idx, bool $checkIdx = null): self - { - $this->idx = $idx; - $this->checkIdx = $checkIdx; - - return $this; - } } diff --git a/src/Feature/Sms/Bag/ScheduleSmssBag.php b/src/Feature/Sms/Bag/ScheduleSmssBag.php index b214567..82330ec 100644 --- a/src/Feature/Sms/Bag/ScheduleSmssBag.php +++ b/src/Feature/Sms/Bag/ScheduleSmssBag.php @@ -69,9 +69,9 @@ public function setParams(array $params): self } /** - * @todo method signature to be changed in next major release as implicitly marking parameter as nullable is deprecated since PHP 8.4 + * @param bool|null $checkIdx */ - public function setExternalId(array $idx, bool $checkIdx = null): self + public function setExternalId(array $idx, $checkIdx = null): self { $this->idx = $idx; $this->checkIdx = $checkIdx; diff --git a/src/Feature/Sms/Bag/SendSmsBag.php b/src/Feature/Sms/Bag/SendSmsBag.php index 9ac48b5..7db1b52 100644 --- a/src/Feature/Sms/Bag/SendSmsBag.php +++ b/src/Feature/Sms/Bag/SendSmsBag.php @@ -63,9 +63,9 @@ public function setParams(array $params): self } /** - * @todo method signature to be changed in next major release as implicitly marking parameter as nullable is deprecated since PHP 8.4 + * @param bool|null $checkIdx */ - public function setExternalId(string $idx, bool $checkIdx = null): self + public function setExternalId(string $idx, $checkIdx = null): self { $this->idx = [$idx]; $this->checkIdx = $checkIdx; diff --git a/src/Feature/Sms/Bag/SendSmsToGroupBag.php b/src/Feature/Sms/Bag/SendSmsToGroupBag.php index a6da846..e89f254 100644 --- a/src/Feature/Sms/Bag/SendSmsToGroupBag.php +++ b/src/Feature/Sms/Bag/SendSmsToGroupBag.php @@ -49,25 +49,13 @@ public static function withTemplateName(string $group, string $templateName): se } /** - * @todo method signature to be changed in next major release as implicitly marking parameter as nullable is deprecated since PHP 8.4 + * @param bool|null $checkIdx */ - public function setExternalId(string $idx, bool $checkIdx = null): self + public function setExternalId(string $idx, $checkIdx = null): self { $this->idx = [$idx]; $this->checkIdx = $checkIdx; return $this; } - - /** - * @deprecated - * @see SendSmsToGroupBag::setExternalId() - */ - public function setIdx(array $idx, bool $checkIdx = null): self - { - $this->idx = $idx; - $this->checkIdx = $checkIdx; - - return $this; - } } diff --git a/src/Feature/Sms/Bag/SendSmssBag.php b/src/Feature/Sms/Bag/SendSmssBag.php index 279bc53..ae4b067 100644 --- a/src/Feature/Sms/Bag/SendSmssBag.php +++ b/src/Feature/Sms/Bag/SendSmssBag.php @@ -64,9 +64,9 @@ public function setParams(array $params): self } /** - * @todo method signature to be changed in next major release as implicitly marking parameter as nullable is deprecated since PHP 8.4 + * @param bool|null $checkIdx */ - public function setExternalId(array $idx, bool $checkIdx = null): self + public function setExternalId(array $idx, $checkIdx = null): self { $this->idx = $idx; $this->checkIdx = $checkIdx; diff --git a/src/SmsapiClient.php b/src/SmsapiClient.php index 1c2bc2b..8ef1412 100644 --- a/src/SmsapiClient.php +++ b/src/SmsapiClient.php @@ -12,7 +12,7 @@ */ interface SmsapiClient extends LoggerAwareInterface { - const VERSION = '3.0.13'; + const VERSION = '4.0.0'; public function smsapiPlService(string $apiToken): SmsapiPlService;