Skip to content

Commit 3d37eb5

Browse files
authored
PHPC-2434: Add PHP 8.4 to GitHub Actions (#1625)
* PHPC-2434: Add PHP 8.4 to GitHub Actions * Make implicitly nullable types explicit * Use latest version of setup-php-sdk action
1 parent da39d53 commit 3d37eb5

File tree

9 files changed

+13
-12
lines changed

9 files changed

+13
-12
lines changed

.github/actions/windows/prepare-build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ runs:
3131
3232
- name: Setup PHP SDK
3333
id: setup-php
34-
uses: php/setup-php-sdk@v0.8
34+
uses: php/setup-php-sdk@v0.9
3535
with:
3636
version: ${{ inputs.version }}
3737
arch: ${{ inputs.arch }}

.github/workflows/package-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@ jobs:
9898
fail-fast: false
9999
matrix:
100100
# Note: keep this in sync with the Windows matrix in tests.yml
101-
php: [ "7.4", "8.0", "8.1", "8.2", "8.3" ]
101+
php: [ "7.4", "8.0", "8.1", "8.2", "8.3", "8.4" ]
102102
arch: [ x64, x86 ]
103103
ts: [ ts, nts ]

.github/workflows/tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
- "8.1"
2929
- "8.2"
3030
- "8.3"
31+
- "8.4"
3132
mongodb-version:
3233
- "4.4"
3334
topology:
@@ -123,6 +124,6 @@ jobs:
123124
fail-fast: false
124125
matrix:
125126
# Note: keep this in sync with the Windows matrix in package-release.yml
126-
php: [ "7.4", "8.0", "8.1", "8.2", "8.3" ]
127+
php: [ "7.4", "8.0", "8.1", "8.2", "8.3", "8.4" ]
127128
arch: [ x64, x86 ]
128129
ts: [ ts, nts ]

tests/bulk/bulkwrite-delete-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class MyClass implements MongoDB\BSON\Persistable
1313
private $id;
1414
private $child;
1515

16-
public function __construct($id, MyClass $child = null)
16+
public function __construct($id, ?MyClass $child = null)
1717
{
1818
$this->id = $id;
1919
$this->child = $child;

tests/bulk/bulkwrite-insert-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class MyClass implements MongoDB\BSON\Persistable
1313
private $id;
1414
private $child;
1515

16-
public function __construct($id, MyClass $child = null)
16+
public function __construct($id, ?MyClass $child = null)
1717
{
1818
$this->id = $id;
1919
$this->child = $child;

tests/bulk/bulkwrite-update-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class MyClass implements MongoDB\BSON\Persistable
1313
private $id;
1414
private $child;
1515

16-
public function __construct($id, MyClass $child = null)
16+
public function __construct($id, ?MyClass $child = null)
1717
{
1818
$this->id = $id;
1919
$this->child = $child;

tests/command/command-ctor-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class MyClass implements MongoDB\BSON\Persistable
1313
private $id;
1414
private $child;
1515

16-
public function __construct($id, MyClass $child = null)
16+
public function __construct($id, ?MyClass $child = null)
1717
{
1818
$this->id = $id;
1919
$this->child = $child;

tests/query/query-ctor-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class MyClass implements MongoDB\BSON\Persistable
1313
private $id;
1414
private $child;
1515

16-
public function __construct($id, MyClass $child = null)
16+
public function __construct($id, ?MyClass $child = null)
1717
{
1818
$this->id = $id;
1919
$this->child = $child;

tests/utils/tools.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function get_module_info($row)
9292
return $matches[1];
9393
}
9494

95-
function create_test_manager(string $uri = null, array $options = [], array $driverOptions = [])
95+
function create_test_manager(?string $uri = null, array $options = [], array $driverOptions = [])
9696
{
9797
if (getenv('API_VERSION') && ! isset($driverOptions['serverApi'])) {
9898
$driverOptions['serverApi'] = new ServerApi(getenv('API_VERSION'));
@@ -628,7 +628,7 @@ function severityToString(int $severity): string {
628628
* from a particular function. Returns the message from the raised error or
629629
* exception, or an empty string if neither was thrown.
630630
*/
631-
function raises(callable $callable, int $expectedSeverity, string $expectedFromFunction = null): string
631+
function raises(callable $callable, int $expectedSeverity, ?string $expectedFromFunction = null): string
632632
{
633633
set_error_handler(function(int $severity, string $message, string $file, int $line) {
634634
throw new ErrorException($message, 0, $severity, $file, $line);
@@ -672,7 +672,7 @@ function raises(callable $callable, int $expectedSeverity, string $expectedFromF
672672
* the exception to be thrown from a particular function. Returns the message
673673
* from the thrown exception, or an empty string if one was not thrown.
674674
*/
675-
function throws(callable $callable, string $expectedException, string $expectedFromFunction = null): string
675+
function throws(callable $callable, string $expectedException, ?string $expectedFromFunction = null): string
676676
{
677677
try {
678678
call_user_func($callable);
@@ -730,7 +730,7 @@ function printWriteResult(WriteResult $result, $details = true)
730730
}
731731
}
732732

733-
function printWriteConcernError(WriteConcernError $error = null, $details)
733+
function printWriteConcernError(?WriteConcernError $error = null, $details = null)
734734
{
735735
if ($error) {
736736
/* This stuff is generated by the server, no need for us to test it */

0 commit comments

Comments
 (0)