Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- main
- master
pull_request:
branches:
- main
- master

jobs:
tests:
Expand All @@ -23,6 +26,7 @@ jobs:
- 8.1
- 8.2
- 8.3
- 8.4
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ 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).

## [Unreleased]
### Added
- PHP-8.4 support

## [3.0.11] - 2024-03-27
### Added
- service url scheme and host validation
Expand Down
3 changes: 3 additions & 0 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ include $(CURDIR)/php-8.0/Makefile
include $(CURDIR)/php-8.1/Makefile
include $(CURDIR)/php-8.2/Makefile
include $(CURDIR)/php-8.3/Makefile
include $(CURDIR)/php-8.4/Makefile

help:
@grep -hE '^[a-zA-Z0-9_.-]+:.*?## .*$$' $(MAKEFILE_LIST) \
Expand All @@ -28,6 +29,7 @@ test: ## test all against all php images
$(MAKE) test-php-8.1
$(MAKE) test-php-8.2
$(MAKE) test-php-8.3
$(MAKE) test-php-8.4

test-unit: ## test unit suite against all php images
$(MAKE) test-suite-php-7.0 SUITE=unit
Expand All @@ -39,5 +41,6 @@ test-unit: ## test unit suite against all php images
$(MAKE) test-suite-php-8.1 SUITE=unit
$(MAKE) test-suite-php-8.2 SUITE=unit
$(MAKE) test-suite-php-8.3 SUITE=unit
$(MAKE) test-suite-php-8.4 SUITE=unit

.DEFAULT_GOAL := help
7 changes: 7 additions & 0 deletions build/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,11 @@ services:
context: php-8.3
volumes:
- ..:/app
network_mode: host

php-8.4:
build:
context: php-8.4
volumes:
- ..:/app
network_mode: host
2 changes: 1 addition & 1 deletion build/php-8.3/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: prepare-php-8.3 test-php-8.3 test-suite-php-8.3

prepare-php-8.3: ## load dependencies with php 8.3
docker-compose run -T php-8.3 /usr/bin/composer update --ignore-platform-req=PHP
docker-compose run -T php-8.3 /usr/bin/composer update

test-php-8.3: prepare-php-8.3 ## run tests against php 8.3
docker-compose run -T php-8.3 php vendor/bin/phpunit --configuration tests-resources/phpunit.xml
Expand Down
18 changes: 18 additions & 0 deletions build/php-8.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM composer:latest AS composer
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

COPY --from=composer /usr/bin/composer /usr/bin/composer

WORKDIR /app/
10 changes: 10 additions & 0 deletions build/php-8.4/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.PHONY: prepare-php-8.4 test-php-8.4 test-suite-php-8.4

prepare-php-8.4: ## load dependencies with php 8.4
docker-compose run -T php-8.4 /usr/bin/composer update

test-php-8.4: prepare-php-8.4 ## run tests against php 8.4
docker-compose run -T php-8.4 php vendor/bin/phpunit --configuration tests-resources/phpunit.xml

test-suite-php-8.4: prepare-php-8.4 ## run suite tests against php 8.4, ex: make test-suite-php-8.4 SUITE="unit"
docker-compose run -T php-8.4 php vendor/bin/phpunit --configuration tests-resources/phpunit.xml --testsuite $(SUITE)
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
},
"require": {
"php": "^7 || ~8.0 || ~8.1 || ~8.2 || ~8.3",
"php": "^7 || ~8.0 || ~8.1 || ~8.2 || ~8.3 || ~8.4",
"ext-json": "*",
"psr/log": "^1 || ^2 || ^3",
"psr/http-message": "~1.0 || ~1.1 || ~2.0",
Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/ContactsFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ interface ContactsFeature
{
/**
* @return Contact[]
* @todo method signature to be changed in next major release as implicitly marking parameter as nullable is deprecated since PHP 8.4
*/
public function findContacts(FindContactsBag $findContactsBag = null): array;

Expand Down
3 changes: 3 additions & 0 deletions src/Feature/Contacts/ContactsHttpFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public function __construct(RestRequestExecutor $restRequestExecutor, DataFactor
$this->dataFactoryProvider = $dataFactoryProvider;
}

/**
* @todo method signature to be changed in next major release as implicitly marking parameter as nullable is deprecated since PHP 8.4
*/
public function findContacts(FindContactsBag $findContactsBag = null): array
{
$result = $this->restRequestExecutor->read('contacts', (array)$findContactsBag);
Expand Down
3 changes: 3 additions & 0 deletions src/Feature/Sms/Bag/ScheduleSmsBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public function setParams(array $params): self
return $this;
}

/**
* @todo method signature to be changed in next major release as implicitly marking parameter as nullable is deprecated since PHP 8.4
*/
public function setExternalId(string $idx, bool $checkIdx = null): self
{
$this->idx = [$idx];
Expand Down
3 changes: 3 additions & 0 deletions src/Feature/Sms/Bag/ScheduleSmsToGroupBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public static function withTemplateName(DateTimeInterface $scheduleAt, string $g
return $bag;
}

/**
* @todo method signature to be changed in next major release as implicitly marking parameter as nullable is deprecated since PHP 8.4
*/
public function setExternalId(string $idx, bool $checkIdx = null): self
{
$this->idx = [$idx];
Expand Down
3 changes: 3 additions & 0 deletions src/Feature/Sms/Bag/ScheduleSmssBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public function setParams(array $params): self
return $this;
}

/**
* @todo method signature to be changed in next major release as implicitly marking parameter as nullable is deprecated since PHP 8.4
*/
public function setExternalId(array $idx, bool $checkIdx = null): self
{
$this->idx = $idx;
Expand Down
3 changes: 3 additions & 0 deletions src/Feature/Sms/Bag/SendSmsBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public function setParams(array $params): self
return $this;
}

/**
* @todo method signature to be changed in next major release as implicitly marking parameter as nullable is deprecated since PHP 8.4
*/
public function setExternalId(string $idx, bool $checkIdx = null): self
{
$this->idx = [$idx];
Expand Down
3 changes: 3 additions & 0 deletions src/Feature/Sms/Bag/SendSmsToGroupBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public static function withTemplateName(string $group, string $templateName): se
return $bag;
}

/**
* @todo method signature to be changed in next major release as implicitly marking parameter as nullable is deprecated since PHP 8.4
*/
public function setExternalId(string $idx, bool $checkIdx = null): self
{
$this->idx = [$idx];
Expand Down
3 changes: 3 additions & 0 deletions src/Feature/Sms/Bag/SendSmssBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public function setParams(array $params): self
return $this;
}

/**
* @todo method signature to be changed in next major release as implicitly marking parameter as nullable is deprecated since PHP 8.4
*/
public function setExternalId(array $idx, bool $checkIdx = null): self
{
$this->idx = $idx;
Expand Down
2 changes: 1 addition & 1 deletion src/SmsapiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
interface SmsapiClient extends LoggerAwareInterface
{
const VERSION = '3.0.11';
const VERSION = 'Unreleased';

public function smsapiPlService(string $apiToken): SmsapiPlService;

Expand Down