Skip to content

Commit de3aaf8

Browse files
authored
PHPLIB-1485: Drop support for MongoDB 3.6 (#1360)
* Remove MongoDB 3.6 from Evergreen build matrix * Remove wire version checks for MongoDB 3.6
1 parent 21cb923 commit de3aaf8

File tree

15 files changed

+53
-115
lines changed

15 files changed

+53
-115
lines changed

.evergreen/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ include:
7979
- filename: .evergreen/config/generated/test/local-4.4.yml
8080
- filename: .evergreen/config/generated/test/local-4.2.yml
8181
- filename: .evergreen/config/generated/test/local-4.0.yml
82-
- filename: .evergreen/config/generated/test/local-3.6.yml
8382
- filename: .evergreen/config/generated/test/load-balanced-latest.yml
8483
- filename: .evergreen/config/generated/test/load-balanced-rapid.yml
8584
- filename: .evergreen/config/generated/test/load-balanced-8.0.yml

.evergreen/config/generate-config.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
'4.4',
2828
'4.2',
2929
'4.0',
30-
'3.6',
3130
];
3231

3332
// Server versions

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

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

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

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

.evergreen/config/generated/test-variant/full-php-8.1.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-variant/full-php-8.2.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-variant/full-php-8.3.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-3.6.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ buildvariants:
1515
name: "build-php-%phpVersion%"
1616
tasks:
1717
# Remember to add new major versions here as they are released
18-
- ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0"
19-
- ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0"
20-
- ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0"
21-
- ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0"
18+
- ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0"
19+
- ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0"
20+
- ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0"
21+
- ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0"
2222
- "test_serverless_task_group"
2323
- "test_serverless_proxy_task_group"
2424
- "test-atlas-data-lake"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ buildvariants:
1212
- variant: "build-debian92"
1313
name: "build-php-%phpVersion%-lowest"
1414
tasks:
15-
- ".replicaset .local .3.6 !.csfle"
15+
- ".replicaset .local .4.0 !.csfle"

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

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

4343
# Test versions < 5.0
4444
- name: test-debian92-php-%phpVersion%-local

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ buildvariants:
1212
- variant: "build-debian12"
1313
name: "build-php-%phpVersion%-next-stable"
1414
tasks:
15-
- ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
16-
- ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
17-
- ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
18-
- ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
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"
1919
- "test_serverless_task_group"
2020
- "test_serverless_proxy_task_group"
2121
- "test-atlas-data-lake"
@@ -32,10 +32,10 @@ buildvariants:
3232
- variant: "build-debian12"
3333
name: "build-php-%phpVersion%-next-minor"
3434
tasks:
35-
- ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
36-
- ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
37-
- ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
38-
- ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
35+
- ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
36+
- ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
37+
- ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
38+
- ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
3939
- "test_serverless_task_group"
4040
- "test_serverless_proxy_task_group"
4141
- "test-atlas-data-lake"

src/Operation/Explain.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
use function current;
2929
use function is_array;
3030
use function is_string;
31-
use function MongoDB\server_supports_feature;
3231

3332
/**
3433
* Operation for the explain command.
@@ -42,8 +41,6 @@ class Explain implements Executable
4241
public const VERBOSITY_EXEC_STATS = 'executionStats';
4342
public const VERBOSITY_QUERY = 'queryPlanner';
4443

45-
private const WIRE_VERSION_FOR_AGGREGATE = 7;
46-
4744
private string $databaseName;
4845

4946
private Explainable $explainable;
@@ -106,10 +103,6 @@ public function __construct(string $databaseName, Explainable $explainable, arra
106103
*/
107104
public function execute(Server $server)
108105
{
109-
if ($this->explainable instanceof Aggregate && ! server_supports_feature($server, self::WIRE_VERSION_FOR_AGGREGATE)) {
110-
throw UnsupportedException::explainNotSupported();
111-
}
112-
113106
$cursor = $server->executeCommand($this->databaseName, $this->createCommand(), $this->createOptions());
114107

115108
if (isset($this->options['typeMap'])) {

src/Operation/Watch.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
use function MongoDB\Driver\Monitoring\removeSubscriber;
4848
use function MongoDB\is_document;
4949
use function MongoDB\select_server;
50-
use function MongoDB\server_supports_feature;
5150

5251
/**
5352
* Operation for creating a change stream with the aggregate command.
@@ -69,8 +68,6 @@ class Watch implements Executable, /* @internal */ CommandSubscriber
6968
public const FULL_DOCUMENT_BEFORE_CHANGE_WHEN_AVAILABLE = 'whenAvailable';
7069
public const FULL_DOCUMENT_BEFORE_CHANGE_REQUIRED = 'required';
7170

72-
private const WIRE_VERSION_FOR_START_AT_OPERATION_TIME = 7;
73-
7471
private Aggregate $aggregate;
7572

7673
private array $aggregateOptions;
@@ -470,10 +467,6 @@ private function shouldCaptureOperationTime(Server $server): bool
470467
return false;
471468
}
472469

473-
if (! server_supports_feature($server, self::WIRE_VERSION_FOR_START_AT_OPERATION_TIME)) {
474-
return false;
475-
}
476-
477470
return true;
478471
}
479472
}

tests/Operation/WatchFunctionalTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
use function assert;
3434
use function bin2hex;
3535
use function microtime;
36-
use function MongoDB\server_supports_feature;
3736
use function sprintf;
3837

3938
/**
@@ -46,8 +45,6 @@ class WatchFunctionalTest extends FunctionalTestCase
4645
public const INTERRUPTED = 11601;
4746
public const NOT_PRIMARY = 10107;
4847

49-
private static int $wireVersionForStartAtOperationTime = 7;
50-
5148
private array $defaultOptions = ['maxAwaitTimeMS' => 500];
5249

5350
public function setUp(): void
@@ -340,10 +337,6 @@ private function assertResumeAfter($expectedResumeToken, stdClass $command): voi
340337
*/
341338
public function testResumeBeforeReceivingAnyResultsIncludesStartAtOperationTime(): void
342339
{
343-
if (! $this->isStartAtOperationTimeSupported()) {
344-
$this->markTestSkipped('startAtOperationTime is not supported');
345-
}
346-
347340
$this->skipIfServerVersion('>=', '4.0.7', 'postBatchResumeToken takes precedence over startAtOperationTime');
348341

349342
$operation = new Watch($this->manager, $this->getDatabaseName(), $this->getCollectionName(), [], $this->defaultOptions);
@@ -1653,11 +1646,6 @@ private function insertDocument($document): void
16531646
$this->assertEquals(1, $writeResult->getInsertedCount());
16541647
}
16551648

1656-
private function isStartAtOperationTimeSupported()
1657-
{
1658-
return server_supports_feature($this->getPrimaryServer(), self::$wireVersionForStartAtOperationTime);
1659-
}
1660-
16611649
private function advanceCursorUntilValid(Iterator $iterator, $limitOnShardedClusters = 10): void
16621650
{
16631651
if (! $this->isShardedCluster()) {

0 commit comments

Comments
 (0)