diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f9c0d24..d0a4a3e 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,23 +81,22 @@ jobs: files: ./coverage.xml smb-versions: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Unit tests strategy: 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 @@ -148,7 +147,7 @@ jobs: files: ./coverage.xml alpine-test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Unit tests (alpine) services: @@ -181,7 +180,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 +212,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 +248,7 @@ jobs: phpstan: name: PHPStan Static Analysis - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: krb5-dev 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