mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Merge pull request #134 from MatthiasKuehneEllerhold/php84
Add "?" to nullable parameters in functions
This commit is contained in:
commit
20efdbafe8
3 changed files with 16 additions and 17 deletions
25
.github/workflows/ci.yaml
vendored
25
.github/workflows/ci.yaml
vendored
|
|
@ -7,7 +7,7 @@ name: CI
|
||||||
jobs:
|
jobs:
|
||||||
php-cs-fixer:
|
php-cs-fixer:
|
||||||
name: PHP-CS-Fixer
|
name: PHP-CS-Fixer
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
|
|
@ -21,7 +21,7 @@ jobs:
|
||||||
args: --diff --dry-run --allow-risky yes --stop-on-violation --using-cache=no --path-mode=intersection
|
args: --diff --dry-run --allow-risky yes --stop-on-violation --using-cache=no --path-mode=intersection
|
||||||
|
|
||||||
php-versions:
|
php-versions:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
name: Unit tests
|
name: Unit tests
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
|
|
@ -81,23 +81,22 @@ jobs:
|
||||||
files: ./coverage.xml
|
files: ./coverage.xml
|
||||||
|
|
||||||
smb-versions:
|
smb-versions:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
name: Unit tests
|
name: Unit tests
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
client-version:
|
client-version:
|
||||||
|
- "4.21.4"
|
||||||
|
- "4.20.4"
|
||||||
|
- "4.19.5"
|
||||||
- "4.18.1"
|
- "4.18.1"
|
||||||
- "4.17.7"
|
- "4.17.7"
|
||||||
- "4.16.10"
|
- "4.16.10"
|
||||||
- "4.15.13"
|
- "4.15.13"
|
||||||
- "4.14.9"
|
- "4.14.9"
|
||||||
- "4.11.17"
|
- "4.11.17"
|
||||||
- "4.10.18"
|
|
||||||
- "4.9.18"
|
|
||||||
- "4.8.12"
|
|
||||||
- "4.7.12"
|
|
||||||
server-version:
|
server-version:
|
||||||
- "latest"
|
- "latest"
|
||||||
- "4.9.4"
|
- "4.9.4"
|
||||||
|
|
@ -117,10 +116,10 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Setup smbclient
|
- name: Setup smbclient
|
||||||
run: |
|
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
|
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
|
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
|
sudo chmod +x /usr/local/bin/smbclient
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
|
|
@ -148,7 +147,7 @@ jobs:
|
||||||
files: ./coverage.xml
|
files: ./coverage.xml
|
||||||
|
|
||||||
alpine-test:
|
alpine-test:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
name: Unit tests (alpine)
|
name: Unit tests (alpine)
|
||||||
|
|
||||||
services:
|
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
|
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:
|
kerberos-sso:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
name: Kerberos SSO tests
|
name: Kerberos SSO tests
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
@ -213,7 +212,7 @@ jobs:
|
||||||
docker logs apache
|
docker logs apache
|
||||||
|
|
||||||
static-psalm-analysis:
|
static-psalm-analysis:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
name: Psalm static analysis
|
name: Psalm static analysis
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
|
|
@ -249,7 +248,7 @@ jobs:
|
||||||
|
|
||||||
phpstan:
|
phpstan:
|
||||||
name: PHPStan Static Analysis
|
name: PHPStan Static Analysis
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: krb5-dev
|
- name: krb5-dev
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ namespace Icewind\SMB\Exception;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
class RevisionMismatchException extends Exception {
|
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);
|
parent::__construct($message, $code, $previous);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -343,7 +343,7 @@ class NativeState {
|
||||||
*
|
*
|
||||||
* @return false|int new file offset as measured from the start of the file on success.
|
* @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) {
|
if (!$this->state) {
|
||||||
throw new ConnectionException("Not connected");
|
throw new ConnectionException("Not connected");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue