Skip to content

Commit 8bcdf7a

Browse files
authored
PHPLIB-1656: Stop testing with MongoDB 4.0 (#1693)
* Remove server version 4.0 from testing * Remove obsolete skips and tests for MongoDB 4.0
1 parent ed5c46b commit 8bcdf7a

File tree

11 files changed

+59
-268
lines changed

11 files changed

+59
-268
lines changed

.evergreen/config/generate-config.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
'5.0',
2323
'4.4',
2424
'4.2',
25-
'4.0',
2625
];
2726

2827
// Server versions

.evergreen/config/generated/test-variant/lowest.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 32 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.evergreen/config/generated/test-variant/phpc.yml

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.evergreen/config/generated/test/local.yml

Lines changed: 0 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.evergreen/config/templates/test-variant/lowest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
- variant: "build-rhel80"
1212
name: "build-php-%phpVersion%-lowest"
1313
tasks:
14-
- ".replicaset .local .4.0 !.csfle"
14+
- ".replicaset .local .4.2 !.csfle"

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
- variant: "build-debian12"
1313
name: "build-php-%phpVersion%"
1414
tasks:
15-
- ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
16-
- ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
17-
- ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
18-
- ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
15+
- ".standalone .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
16+
- ".replicaset .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
17+
- ".sharded .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
18+
- ".loadbalanced .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
1919
- "test_serverless_task_group"
2020
- "test_serverless_proxy_task_group"
2121
- "test-atlas-data-lake"
@@ -34,10 +34,10 @@
3434
name: "build-php-%phpVersion%"
3535
tasks:
3636
# Remember to add new major versions here as they are released
37-
- ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
38-
- ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
39-
- ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
40-
- ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
37+
- ".standalone .local !.csfle !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
38+
- ".replicaset .local !.csfle !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
39+
- ".sharded .local !.csfle !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
40+
- ".loadbalanced .local !.csfle !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
4141

4242
# Test versions < 5.0
4343
- name: test-rhel80-php-%phpVersion%

.evergreen/config/templates/test-variant/phpc.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
- variant: "build-debian12"
1212
name: "build-php-%phpVersion%-next-stable"
1313
tasks:
14-
- ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
15-
- ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
16-
- ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
17-
- ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
14+
- ".standalone .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
15+
- ".replicaset .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
16+
- ".sharded .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
17+
- ".loadbalanced .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
1818
- "test_serverless_task_group"
1919
- "test_serverless_proxy_task_group"
2020
- "test-atlas-data-lake"
@@ -31,10 +31,10 @@
3131
- variant: "build-debian12"
3232
name: "build-php-%phpVersion%-next-minor"
3333
tasks:
34-
- ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
35-
- ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
36-
- ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
37-
- ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
34+
- ".standalone .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
35+
- ".replicaset .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
36+
- ".sharded .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
37+
- ".loadbalanced .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
3838
- "test_serverless_task_group"
3939
- "test_serverless_proxy_task_group"
4040
- "test-atlas-data-lake"

tests/FunctionalTestCase.php

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,6 @@ protected function assertSameObjectId($expectedObjectId, $actualObjectId): void
215215
*/
216216
public function configureFailPoint(array|stdClass $command, ?Server $server = null): void
217217
{
218-
if (! $this->isFailCommandSupported()) {
219-
$this->markTestSkipped('failCommand is only supported on mongod >= 4.0.0 and mongos >= 4.1.5.');
220-
}
221-
222218
if (! $this->isFailCommandEnabled()) {
223219
$this->markTestSkipped('The enableTestCommands parameter is not enabled.');
224220
}
@@ -512,15 +508,7 @@ protected function skipIfTransactionsAreNotSupported(): void
512508
}
513509

514510
if ($this->isShardedCluster()) {
515-
if (version_compare($this->getFeatureCompatibilityVersion(), '4.2', '<')) {
516-
$this->markTestSkipped('Transactions are only supported on FCV 4.2 or higher');
517-
}
518-
519-
return;
520-
}
521-
522-
if (version_compare($this->getFeatureCompatibilityVersion(), '4.0', '<')) {
523-
$this->markTestSkipped('Transactions are only supported on FCV 4.0 or higher');
511+
$this->markTestSkipped('Transactions are only supported on FCV 4.2 or higher');
524512
}
525513

526514
if ($this->getServerStorageEngine() !== 'wiredTiger') {
@@ -698,16 +686,6 @@ private static function getUriWithoutMultipleMongoses(): string
698686
return $uri;
699687
}
700688

701-
/**
702-
* Checks if the failCommand command is supported on this server version
703-
*/
704-
private function isFailCommandSupported(): bool
705-
{
706-
$minVersion = $this->isShardedCluster() ? '4.1.5' : '4.0.0';
707-
708-
return version_compare($this->getServerVersion(), $minVersion, '>=');
709-
}
710-
711689
/**
712690
* Checks if the failCommand command is enabled by checking the enableTestCommands parameter
713691
*/

tests/Operation/ExplainFunctionalTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,6 @@ public function testUpdateOne($verbosity, $executionStatsExpected, $allPlansExec
307307

308308
public function testAggregate(): void
309309
{
310-
$this->skipIfServerVersion('<', '4.0.0', 'Explaining aggregate command requires server version >= 4.0');
311-
312310
$this->createFixtures(3);
313311

314312
// Use a $sort stage to ensure the aggregate does not get optimised to a query

0 commit comments

Comments
 (0)