Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPC-2434: Add PHP 8.4 to GitHub Actions #1625

Merged
merged 3 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/windows/prepare-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with:
version: ${{ inputs.version }}
arch: ${{ inputs.arch }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
mongodb-version:
- "4.4"
topology:
Expand Down Expand Up @@ -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 ]
2 changes: 1 addition & 1 deletion tests/bulk/bulkwrite-delete-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
$this->id = $id;
$this->child = $child;
Expand Down
2 changes: 1 addition & 1 deletion tests/bulk/bulkwrite-insert-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/bulk/bulkwrite-update-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/command/command-ctor-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/query/query-ctor-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions tests/utils/tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 */
Expand Down