Skip to content

Commit 24214b6

Browse files
authored
PHPLIB-955: Require PHP 8.1 (#1374)
* PHPLIB-955: Require PHP 8.1 * Apply automated phpcs fixes for PHP 8.1 * Fix psalm issues * Remove unnecessary type assertions * Fix wrong type in DocumentsMatchConstraint * Use constructor property promotion where possible * Update Psalm baseline * Remove commented code * Use match statement instead of switch * Fix breakage introduced by constructor property promotion * Always access promoted options property in constructor * Restore PackedArray as invalid document in tests
1 parent 0ae74da commit 24214b6

File tree

150 files changed

+693
-1669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+693
-1669
lines changed

.evergreen/config.yml

-1
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,3 @@ include:
7171
- filename: .evergreen/config/generated/test/require-api-version.yml
7272
- filename: .evergreen/config/generated/test/csfle.yml
7373
- filename: .evergreen/config/generated/test-variant/modern-php-full.yml
74-
- filename: .evergreen/config/generated/test-variant/legacy-php-full.yml

.evergreen/config/build-task-groups.yml

+1-13
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,10 @@ task_groups:
1111
# Builds all versions of PHP
1212
- name: "build-all-php"
1313
# Keep this number in sync with the number of PHP versions to allow for parallel builds
14-
max_hosts: 4
14+
max_hosts: 3
1515
setup_task: *build_setup
1616
setup_task_can_fail_task: true
1717
setup_task_timeout_secs: 1800
1818
teardown_task: *build_teardown
1919
tasks:
2020
- ".build"
21-
22-
# Builds all versions of PHP that support OpenSSL 3 (PHP 8.1+)
23-
- name: "build-php-openssl3"
24-
# Keep this number in sync with the number of PHP versions to allow for parallel builds
25-
# Subtract 2 versions as PHP 7.4 and 8.0 are not built with OpenSSL 3
26-
max_hosts: 2
27-
setup_task: *build_setup
28-
setup_task_can_fail_task: true
29-
setup_task_timeout_secs: 1800
30-
teardown_task: *build_teardown
31-
tasks:
32-
- ".build !.php7.4 !.php8.0"

.evergreen/config/build-variants.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildvariants:
88
tags: ["build", "debian", "x64"]
99
run_on: debian12-small
1010
tasks:
11-
- name: "build-php-openssl3"
11+
- name: "build-all-php"
1212
- name: build-debian11
1313
display_name: "Build: Debian 11"
1414
tags: ["build", "debian", "x64", "pr", "tag"]
@@ -34,7 +34,7 @@ buildvariants:
3434
tags: ["build", "rhel", "x64", "pr", "tag"]
3535
run_on: rhel90-small
3636
tasks:
37-
- name: "build-php-openssl3"
37+
- name: "build-all-php"
3838
- name: build-rhel83-zseries
3939
display_name: "Build: RHEL 8.3 Zseries"
4040
tags: ["build", "rhel", "zseries", "tag"]
@@ -66,13 +66,13 @@ buildvariants:
6666
tags: ["build", "ubuntu", "x64", "pr", "tag"]
6767
run_on: ubuntu2204-small
6868
tasks:
69-
- name: "build-php-openssl3"
69+
- name: "build-all-php"
7070
- name: build-ubuntu2204-arm64
7171
display_name: "Build: Ubuntu 22.04 ARM64"
7272
tags: ["build", "ubuntu", "arm64", "tag"]
7373
run_on: ubuntu2204-arm64-small
7474
tasks:
75-
- name: "build-php-openssl3"
75+
- name: "build-all-php"
7676
- name: build-ubuntu2004
7777
display_name: "Build: Ubuntu 20.04 x64"
7878
tags: ["build", "ubuntu", "x64", "pr", "tag"]

.evergreen/config/generate-config.php

+2-8
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,11 @@
22
<?php
33

44
// Supported PHP versions. Add new versions to the beginning of the list
5-
$modernPhpVersions = [
5+
$supportedPhpVersions = [
66
'8.3',
77
'8.2',
88
'8.1',
99
];
10-
$legacyPhpVersions = [
11-
'8.0',
12-
'7.4',
13-
];
14-
$supportedPhpVersions = array_merge($modernPhpVersions, $legacyPhpVersions);
1510

1611
$latestPhpVersion = max($supportedPhpVersions);
1712
$lowestPhpVersion = min($supportedPhpVersions);
@@ -59,8 +54,7 @@
5954
$allFiles[] = generateConfigs('tasks', 'test', 'mongodbVersion', 'csfle.yml', $csfleServerVersions);
6055

6156
// Test variants
62-
$allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'modern-php-full.yml', $modernPhpVersions);
63-
$allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'legacy-php-full.yml', $legacyPhpVersions);
57+
$allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'modern-php-full.yml', $supportedPhpVersions);
6458
// TODO: Re-enable when 1.20.0 is released
6559
// $allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'phpc.yml', [$latestPhpVersion]);
6660
// $allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'lowest.yml', [$lowestPhpVersion]);

.evergreen/config/generated/build/build-extension.yml

-84
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.evergreen/config/generated/test-variant/legacy-php-full.yml

-114
This file was deleted.

.evergreen/config/templates/test-variant/legacy-php-full.yml

-56
This file was deleted.

.github/workflows/tests.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ jobs:
2929
os:
3030
- "ubuntu-20.04"
3131
php-version:
32-
- "7.4"
33-
- "8.0"
3432
- "8.1"
3533
- "8.2"
3634
- "8.3"
@@ -41,23 +39,23 @@ jobs:
4139
- "server"
4240
include:
4341
- os: "ubuntu-20.04"
44-
php-version: "8.0"
42+
php-version: "8.1"
4543
mongodb-version: "6.0"
4644
topology: "replica_set"
4745
- os: "ubuntu-20.04"
48-
php-version: "8.0"
46+
php-version: "8.1"
4947
mongodb-version: "6.0"
5048
topology: "sharded_cluster"
5149
- os: "ubuntu-20.04"
52-
php-version: "8.0"
50+
php-version: "8.1"
5351
mongodb-version: "5.0"
5452
topology: "server"
5553
- os: "ubuntu-20.04"
56-
php-version: "8.0"
54+
php-version: "8.1"
5755
mongodb-version: "4.4"
5856
topology: "replica_set"
5957
- os: "ubuntu-20.04"
60-
php-version: "8.0"
58+
php-version: "8.1"
6159
mongodb-version: "4.4"
6260
topology: "sharded_cluster"
6361

0 commit comments

Comments
 (0)