Skip to content
This repository was archived by the owner on May 30, 2025. It is now read-only.

Commit 20efdba

Browse files
authored
Merge pull request #134 from MatthiasKuehneEllerhold/php84
Add "?" to nullable parameters in functions
2 parents 4b9add1 + 9949f3d commit 20efdba

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: CI
77
jobs:
88
php-cs-fixer:
99
name: PHP-CS-Fixer
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111
steps:
1212
- uses: actions/checkout@v3
1313
- name: Setup PHP
@@ -21,7 +21,7 @@ jobs:
2121
args: --diff --dry-run --allow-risky yes --stop-on-violation --using-cache=no --path-mode=intersection
2222

2323
php-versions:
24-
runs-on: ubuntu-20.04
24+
runs-on: ubuntu-22.04
2525
name: Unit tests
2626

2727
strategy:
@@ -81,23 +81,22 @@ jobs:
8181
files: ./coverage.xml
8282

8383
smb-versions:
84-
runs-on: ubuntu-20.04
84+
runs-on: ubuntu-22.04
8585
name: Unit tests
8686

8787
strategy:
8888
fail-fast: false
8989
matrix:
9090
client-version:
91+
- "4.21.4"
92+
- "4.20.4"
93+
- "4.19.5"
9194
- "4.18.1"
9295
- "4.17.7"
9396
- "4.16.10"
9497
- "4.15.13"
9598
- "4.14.9"
9699
- "4.11.17"
97-
- "4.10.18"
98-
- "4.9.18"
99-
- "4.8.12"
100-
- "4.7.12"
101100
server-version:
102101
- "latest"
103102
- "4.9.4"
@@ -117,10 +116,10 @@ jobs:
117116
steps:
118117
- name: Setup smbclient
119118
run: |
120-
sudo apt install libjansson4 libcap2 libbsd0 libreadline8 libicu66
119+
sudo apt install libjansson4 libcap2 libbsd0 libreadline8 libicu70
121120
sudo mkdir -p /etc/samba /var/lib/samba/private
122121
echo "[global]\nclient min protocol = SMB2\nclient max protocol = SMB3" | sudo tee /etc/samba/smb.conf
123-
sudo wget "https://github.com/icewind1991/smbclient-builder/releases/download/v0.1.2/smbclient-${{ matrix.client-version }}" -O /usr/local/bin/smbclient
122+
sudo wget "https://github.com/icewind1991/smbclient-builder/releases/download/v0.2.0/smbclient-${{ matrix.client-version }}" -O /usr/local/bin/smbclient
124123
sudo chmod +x /usr/local/bin/smbclient
125124
- uses: actions/checkout@v3
126125
- name: Setup PHP
@@ -148,7 +147,7 @@ jobs:
148147
files: ./coverage.xml
149148

150149
alpine-test:
151-
runs-on: ubuntu-20.04
150+
runs-on: ubuntu-22.04
152151
name: Unit tests (alpine)
153152

154153
services:
@@ -181,7 +180,7 @@ jobs:
181180
docker run --network "host" --rm -v $PWD:/smb icewind1991/smbclient-php-alpine /smb/vendor/bin/phpunit -c /smb/tests/phpunit.xml /smb/tests
182181
183182
kerberos-sso:
184-
runs-on: ubuntu-20.04
183+
runs-on: ubuntu-22.04
185184
name: Kerberos SSO tests
186185
steps:
187186
- uses: actions/checkout@v3
@@ -213,7 +212,7 @@ jobs:
213212
docker logs apache
214213
215214
static-psalm-analysis:
216-
runs-on: ubuntu-20.04
215+
runs-on: ubuntu-22.04
217216
name: Psalm static analysis
218217

219218
strategy:
@@ -249,7 +248,7 @@ jobs:
249248

250249
phpstan:
251250
name: PHPStan Static Analysis
252-
runs-on: ubuntu-20.04
251+
runs-on: ubuntu-22.04
253252

254253
steps:
255254
- name: krb5-dev

src/Exception/RevisionMismatchException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Throwable;
1010

1111
class RevisionMismatchException extends Exception {
12-
public function __construct(string $message = 'Protocol version mismatch', int $code = 0, Throwable $previous = null) {
12+
public function __construct(string $message = 'Protocol version mismatch', int $code = 0, ?Throwable $previous = null) {
1313
parent::__construct($message, $code, $previous);
1414
}
15-
}
15+
}

src/Native/NativeState.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ public function write($file, string $data, string $path, ?int $length = null): i
343343
*
344344
* @return false|int new file offset as measured from the start of the file on success.
345345
*/
346-
public function lseek($file, int $offset, int $whence = SEEK_SET, string $path = null) {
346+
public function lseek($file, int $offset, int $whence = SEEK_SET, ?string $path = null) {
347347
if (!$this->state) {
348348
throw new ConnectionException("Not connected");
349349
}
@@ -430,4 +430,4 @@ public function __destruct() {
430430
}
431431
}
432432
}
433-
}
433+
}

0 commit comments

Comments
 (0)