From 8a6c8cd17c07c6fc68219a5ce8f002683b478a2d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 8 Nov 2024 12:06:31 +0100 Subject: [PATCH 1/4] feat: Add PHP 8.4 support Signed-off-by: Joas Schilling --- .github/workflows/ci.yaml | 2 ++ src/Exception/Exception.php | 2 +- src/Exception/InvalidRequestException.php | 2 +- src/ServerFactory.php | 6 +++--- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 78dc3fa..6e431eb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -222,6 +222,8 @@ jobs: - "8.0" - "8.1" - "8.2" + - "8.3" + - "8.4" steps: - name: krb5-dev diff --git a/src/Exception/Exception.php b/src/Exception/Exception.php index 2c4bb12..199cdf3 100644 --- a/src/Exception/Exception.php +++ b/src/Exception/Exception.php @@ -12,7 +12,7 @@ * @psalm-consistent-constructor */ class Exception extends \Exception { - public function __construct(string $message = "", int $code = 0, Throwable $previous = null) { + public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Exception/InvalidRequestException.php b/src/Exception/InvalidRequestException.php index 1212420..d6ee8db 100644 --- a/src/Exception/InvalidRequestException.php +++ b/src/Exception/InvalidRequestException.php @@ -12,7 +12,7 @@ class InvalidRequestException extends Exception { */ protected $path; - public function __construct(string $path = "", int $code = 0, \Throwable $previous = null) { + public function __construct(string $path = "", int $code = 0, ?\Throwable $previous = null) { $class = get_class($this); $parts = explode('\\', $class); $baseName = array_pop($parts); diff --git a/src/ServerFactory.php b/src/ServerFactory.php index 28f0180..ee7e5af 100644 --- a/src/ServerFactory.php +++ b/src/ServerFactory.php @@ -33,9 +33,9 @@ class ServerFactory { * @param ITimeZoneProvider|null $timeZoneProvider */ public function __construct( - IOptions $options = null, - ISystem $system = null, - ITimeZoneProvider $timeZoneProvider = null + ?IOptions $options = null, + ?ISystem $system = null, + ?ITimeZoneProvider $timeZoneProvider = null ) { if (is_null($options)) { $options = new Options(); From 5362b670f81523e4ac665b167108356e32019bc7 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 8 Nov 2024 18:47:10 +0100 Subject: [PATCH 2/4] fix php-smbclient install --- .github/workflows/ci.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6e431eb..fba8441 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -35,6 +35,10 @@ jobs: - "7.3" - "7.4" - "8.0" + - "8.1" + - "8.2" + - "8.3" + - "8.4" services: samba: @@ -50,7 +54,7 @@ jobs: steps: - name: Install packages run: | - sudo apt-get install smbclient + sudo apt-get install smbclient libsmbclient-dev - uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -227,7 +231,7 @@ jobs: steps: - name: krb5-dev - run: sudo apt-get install -y libkrb5-dev + run: sudo apt-get install -y libkrb5-dev libsmbclient-dev - name: Checkout uses: actions/checkout@v3 - name: Set up php From 5f5e92445384427c2657d1ed3b4fa03273449803 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 8 Nov 2024 19:26:51 +0100 Subject: [PATCH 3/4] composer v2 in ci --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fba8441..d26937c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -238,7 +238,7 @@ jobs: uses: shivammathur/setup-php@master with: php-version: "${{ matrix.php-version }}" - tools: composer:v1 + tools: composer:v2 coverage: none extensions: apcu, smbclient, krb5 env: From 81610a3bbf6b508c353ea57e3863b57f5ff3182e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 11 Nov 2024 15:00:42 +0100 Subject: [PATCH 4/4] disable psalm on 8.4 for now --- .github/workflows/ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d26937c..f9c0d24 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -227,7 +227,6 @@ jobs: - "8.1" - "8.2" - "8.3" - - "8.4" steps: - name: krb5-dev