From 42627c6bb8daa850615e0b819cb42ef52e67a7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BChne?= Date: Fri, 2 May 2025 13:38:01 +0200 Subject: [PATCH 1/3] Add "?" to nullable parameters in functions --- src/Exception/RevisionMismatchException.php | 4 ++-- src/Native/NativeState.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Exception/RevisionMismatchException.php b/src/Exception/RevisionMismatchException.php index a395401..26ca049 100644 --- a/src/Exception/RevisionMismatchException.php +++ b/src/Exception/RevisionMismatchException.php @@ -9,7 +9,7 @@ use Throwable; class RevisionMismatchException extends Exception { - public function __construct(string $message = 'Protocol version mismatch', int $code = 0, Throwable $previous = null) { + public function __construct(string $message = 'Protocol version mismatch', int $code = 0, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); } -} +} \ No newline at end of file diff --git a/src/Native/NativeState.php b/src/Native/NativeState.php index 99cef05..68247b5 100644 --- a/src/Native/NativeState.php +++ b/src/Native/NativeState.php @@ -343,7 +343,7 @@ public function write($file, string $data, string $path, ?int $length = null): i * * @return false|int new file offset as measured from the start of the file on success. */ - public function lseek($file, int $offset, int $whence = SEEK_SET, string $path = null) { + public function lseek($file, int $offset, int $whence = SEEK_SET, ?string $path = null) { if (!$this->state) { throw new ConnectionException("Not connected"); } @@ -430,4 +430,4 @@ public function __destruct() { } } } -} +} \ No newline at end of file From 98206e22b7fe3de2c241ddda689136fa977e11b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BChne?= Date: Fri, 2 May 2025 13:47:11 +0200 Subject: [PATCH 2/3] Upgrade CI env to 22.04 because 20.04 was removed 2025-04-15 --- .github/workflows/ci.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f9c0d24..7d452d2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,7 @@ name: CI jobs: php-cs-fixer: name: PHP-CS-Fixer - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Setup PHP @@ -21,7 +21,7 @@ jobs: args: --diff --dry-run --allow-risky yes --stop-on-violation --using-cache=no --path-mode=intersection php-versions: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Unit tests strategy: @@ -81,7 +81,7 @@ jobs: files: ./coverage.xml smb-versions: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Unit tests strategy: @@ -148,7 +148,7 @@ jobs: files: ./coverage.xml alpine-test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Unit tests (alpine) services: @@ -181,7 +181,7 @@ jobs: docker run --network "host" --rm -v $PWD:/smb icewind1991/smbclient-php-alpine /smb/vendor/bin/phpunit -c /smb/tests/phpunit.xml /smb/tests kerberos-sso: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Kerberos SSO tests steps: - uses: actions/checkout@v3 @@ -213,7 +213,7 @@ jobs: docker logs apache static-psalm-analysis: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Psalm static analysis strategy: @@ -249,7 +249,7 @@ jobs: phpstan: name: PHPStan Static Analysis - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: krb5-dev From 9949f3de6aac988058ef75b22b24cbc12b638717 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sat, 3 May 2025 14:47:45 +0200 Subject: [PATCH 3/3] update smbclient setup --- .github/workflows/ci.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7d452d2..d0a4a3e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -88,16 +88,15 @@ jobs: fail-fast: false matrix: client-version: + - "4.21.4" + - "4.20.4" + - "4.19.5" - "4.18.1" - "4.17.7" - "4.16.10" - "4.15.13" - "4.14.9" - "4.11.17" - - "4.10.18" - - "4.9.18" - - "4.8.12" - - "4.7.12" server-version: - "latest" - "4.9.4" @@ -117,10 +116,10 @@ jobs: steps: - name: Setup smbclient run: | - sudo apt install libjansson4 libcap2 libbsd0 libreadline8 libicu66 + sudo apt install libjansson4 libcap2 libbsd0 libreadline8 libicu70 sudo mkdir -p /etc/samba /var/lib/samba/private echo "[global]\nclient min protocol = SMB2\nclient max protocol = SMB3" | sudo tee /etc/samba/smb.conf - sudo wget "https://github.com/icewind1991/smbclient-builder/releases/download/v0.1.2/smbclient-${{ matrix.client-version }}" -O /usr/local/bin/smbclient + sudo wget "https://github.com/icewind1991/smbclient-builder/releases/download/v0.2.0/smbclient-${{ matrix.client-version }}" -O /usr/local/bin/smbclient sudo chmod +x /usr/local/bin/smbclient - uses: actions/checkout@v3 - name: Setup PHP