diff --git a/.github/actions/windows/prepare-build/action.yml b/.github/actions/windows/prepare-build/action.yml index 153c44bfa..1ef49a17c 100644 --- a/.github/actions/windows/prepare-build/action.yml +++ b/.github/actions/windows/prepare-build/action.yml @@ -31,7 +31,7 @@ runs: - name: Setup PHP SDK id: setup-php - uses: php/setup-php-sdk@v0.8 + uses: php/setup-php-sdk@v0.9 with: version: ${{ inputs.version }} arch: ${{ inputs.arch }} diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml index 6f34ff905..b1c67a2ae 100644 --- a/.github/workflows/package-release.yml +++ b/.github/workflows/package-release.yml @@ -98,6 +98,6 @@ jobs: fail-fast: false matrix: # Note: keep this in sync with the Windows matrix in tests.yml - php: [ "7.4", "8.0", "8.1", "8.2", "8.3" ] + php: [ "7.4", "8.0", "8.1", "8.2", "8.3", "8.4" ] arch: [ x64, x86 ] ts: [ ts, nts ] diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 44bd4cdcb..654d40c91 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,6 +28,7 @@ jobs: - "8.1" - "8.2" - "8.3" + - "8.4" mongodb-version: - "4.4" topology: @@ -123,6 +124,6 @@ jobs: fail-fast: false matrix: # Note: keep this in sync with the Windows matrix in package-release.yml - php: [ "7.4", "8.0", "8.1", "8.2", "8.3" ] + php: [ "7.4", "8.0", "8.1", "8.2", "8.3", "8.4" ] arch: [ x64, x86 ] ts: [ ts, nts ] diff --git a/tests/bulk/bulkwrite-delete-001.phpt b/tests/bulk/bulkwrite-delete-001.phpt index b0bae3521..d8a999b84 100644 --- a/tests/bulk/bulkwrite-delete-001.phpt +++ b/tests/bulk/bulkwrite-delete-001.phpt @@ -13,7 +13,7 @@ class MyClass implements MongoDB\BSON\Persistable private $id; private $child; - public function __construct($id, MyClass $child = null) + public function __construct($id, ?MyClass $child = null) { $this->id = $id; $this->child = $child; diff --git a/tests/bulk/bulkwrite-insert-001.phpt b/tests/bulk/bulkwrite-insert-001.phpt index 4160a95f8..b2e57b11b 100644 --- a/tests/bulk/bulkwrite-insert-001.phpt +++ b/tests/bulk/bulkwrite-insert-001.phpt @@ -13,7 +13,7 @@ class MyClass implements MongoDB\BSON\Persistable private $id; private $child; - public function __construct($id, MyClass $child = null) + public function __construct($id, ?MyClass $child = null) { $this->id = $id; $this->child = $child; diff --git a/tests/bulk/bulkwrite-update-001.phpt b/tests/bulk/bulkwrite-update-001.phpt index a02a78a90..e6e530984 100644 --- a/tests/bulk/bulkwrite-update-001.phpt +++ b/tests/bulk/bulkwrite-update-001.phpt @@ -13,7 +13,7 @@ class MyClass implements MongoDB\BSON\Persistable private $id; private $child; - public function __construct($id, MyClass $child = null) + public function __construct($id, ?MyClass $child = null) { $this->id = $id; $this->child = $child; diff --git a/tests/command/command-ctor-001.phpt b/tests/command/command-ctor-001.phpt index 024b34d96..7716abb52 100644 --- a/tests/command/command-ctor-001.phpt +++ b/tests/command/command-ctor-001.phpt @@ -13,7 +13,7 @@ class MyClass implements MongoDB\BSON\Persistable private $id; private $child; - public function __construct($id, MyClass $child = null) + public function __construct($id, ?MyClass $child = null) { $this->id = $id; $this->child = $child; diff --git a/tests/query/query-ctor-001.phpt b/tests/query/query-ctor-001.phpt index 98861f87c..b2f88a1d4 100644 --- a/tests/query/query-ctor-001.phpt +++ b/tests/query/query-ctor-001.phpt @@ -13,7 +13,7 @@ class MyClass implements MongoDB\BSON\Persistable private $id; private $child; - public function __construct($id, MyClass $child = null) + public function __construct($id, ?MyClass $child = null) { $this->id = $id; $this->child = $child; diff --git a/tests/utils/tools.php b/tests/utils/tools.php index e308e3e5c..07142cc32 100644 --- a/tests/utils/tools.php +++ b/tests/utils/tools.php @@ -92,7 +92,7 @@ function get_module_info($row) return $matches[1]; } -function create_test_manager(string $uri = null, array $options = [], array $driverOptions = []) +function create_test_manager(?string $uri = null, array $options = [], array $driverOptions = []) { if (getenv('API_VERSION') && ! isset($driverOptions['serverApi'])) { $driverOptions['serverApi'] = new ServerApi(getenv('API_VERSION')); @@ -628,7 +628,7 @@ function severityToString(int $severity): string { * from a particular function. Returns the message from the raised error or * exception, or an empty string if neither was thrown. */ -function raises(callable $callable, int $expectedSeverity, string $expectedFromFunction = null): string +function raises(callable $callable, int $expectedSeverity, ?string $expectedFromFunction = null): string { set_error_handler(function(int $severity, string $message, string $file, int $line) { throw new ErrorException($message, 0, $severity, $file, $line); @@ -672,7 +672,7 @@ function raises(callable $callable, int $expectedSeverity, string $expectedFromF * the exception to be thrown from a particular function. Returns the message * from the thrown exception, or an empty string if one was not thrown. */ -function throws(callable $callable, string $expectedException, string $expectedFromFunction = null): string +function throws(callable $callable, string $expectedException, ?string $expectedFromFunction = null): string { try { call_user_func($callable); @@ -730,7 +730,7 @@ function printWriteResult(WriteResult $result, $details = true) } } -function printWriteConcernError(WriteConcernError $error = null, $details) +function printWriteConcernError(?WriteConcernError $error = null, $details = null) { if ($error) { /* This stuff is generated by the server, no need for us to test it */