From 8e4edee2f3d465c32836fe506254e45330019238 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Mon, 15 Jul 2024 13:28:40 +0200 Subject: [PATCH 1/2] Remove MongoDB 3.6 from Evergreen build matrix --- .evergreen/config.yml | 1 - .evergreen/config/generate-config.php | 1 - .../generated/test-variant/full-php-7.4.yml | 8 ++--- .../generated/test-variant/full-php-8.0.yml | 8 ++--- .../generated/test-variant/full-php-8.1.yml | 16 ++++----- .../generated/test-variant/full-php-8.2.yml | 16 ++++----- .../generated/test-variant/full-php-8.3.yml | 16 ++++----- .../config/generated/test/local-3.6.yml | 34 ------------------- .../test-variant/legacy-php-full.yml | 8 ++--- .../config/templates/test-variant/lowest.yml | 2 +- .../test-variant/modern-php-full.yml | 16 ++++----- .../config/templates/test-variant/phpc.yml | 16 ++++----- 12 files changed, 53 insertions(+), 89 deletions(-) delete mode 100644 .evergreen/config/generated/test/local-3.6.yml diff --git a/.evergreen/config.yml b/.evergreen/config.yml index fcf1ccef1..c5dfae8a7 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -79,7 +79,6 @@ include: - filename: .evergreen/config/generated/test/local-4.4.yml - filename: .evergreen/config/generated/test/local-4.2.yml - filename: .evergreen/config/generated/test/local-4.0.yml - - filename: .evergreen/config/generated/test/local-3.6.yml - filename: .evergreen/config/generated/test/load-balanced-latest.yml - filename: .evergreen/config/generated/test/load-balanced-rapid.yml - filename: .evergreen/config/generated/test/load-balanced-8.0.yml diff --git a/.evergreen/config/generate-config.php b/.evergreen/config/generate-config.php index 270c65f62..07f8ca8ad 100644 --- a/.evergreen/config/generate-config.php +++ b/.evergreen/config/generate-config.php @@ -27,7 +27,6 @@ '4.4', '4.2', '4.0', - '3.6', ]; // Server versions diff --git a/.evergreen/config/generated/test-variant/full-php-7.4.yml b/.evergreen/config/generated/test-variant/full-php-7.4.yml index 03366c9dc..56e68a4ea 100644 --- a/.evergreen/config/generated/test-variant/full-php-7.4.yml +++ b/.evergreen/config/generated/test-variant/full-php-7.4.yml @@ -16,10 +16,10 @@ buildvariants: name: "build-php-7.4" tasks: # Remember to add new major versions here as they are released - - ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0" - - ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0" - - ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0" - - ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0" + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0" - "test_serverless_task_group" - "test_serverless_proxy_task_group" - "test-atlas-data-lake" diff --git a/.evergreen/config/generated/test-variant/full-php-8.0.yml b/.evergreen/config/generated/test-variant/full-php-8.0.yml index 25399db7b..f28db1a5c 100644 --- a/.evergreen/config/generated/test-variant/full-php-8.0.yml +++ b/.evergreen/config/generated/test-variant/full-php-8.0.yml @@ -16,10 +16,10 @@ buildvariants: name: "build-php-8.0" tasks: # Remember to add new major versions here as they are released - - ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0" - - ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0" - - ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0" - - ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0" + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0" - "test_serverless_task_group" - "test_serverless_proxy_task_group" - "test-atlas-data-lake" diff --git a/.evergreen/config/generated/test-variant/full-php-8.1.yml b/.evergreen/config/generated/test-variant/full-php-8.1.yml index 7cc791264..f42ad1e9b 100644 --- a/.evergreen/config/generated/test-variant/full-php-8.1.yml +++ b/.evergreen/config/generated/test-variant/full-php-8.1.yml @@ -14,10 +14,10 @@ buildvariants: - variant: "build-debian12" name: "build-php-8.1" tasks: - - ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - "test_serverless_task_group" - "test_serverless_proxy_task_group" - "test-atlas-data-lake" @@ -36,10 +36,10 @@ buildvariants: name: "build-php-8.1" tasks: # Remember to add new major versions here as they are released - - ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" - - ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" - - ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" - - ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" # Test versions < 5.0 - name: test-debian92-php-8.1-local diff --git a/.evergreen/config/generated/test-variant/full-php-8.2.yml b/.evergreen/config/generated/test-variant/full-php-8.2.yml index b5000f601..521f8d323 100644 --- a/.evergreen/config/generated/test-variant/full-php-8.2.yml +++ b/.evergreen/config/generated/test-variant/full-php-8.2.yml @@ -14,10 +14,10 @@ buildvariants: - variant: "build-debian12" name: "build-php-8.2" tasks: - - ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - "test_serverless_task_group" - "test_serverless_proxy_task_group" - "test-atlas-data-lake" @@ -36,10 +36,10 @@ buildvariants: name: "build-php-8.2" tasks: # Remember to add new major versions here as they are released - - ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" - - ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" - - ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" - - ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" # Test versions < 5.0 - name: test-debian92-php-8.2-local diff --git a/.evergreen/config/generated/test-variant/full-php-8.3.yml b/.evergreen/config/generated/test-variant/full-php-8.3.yml index 906760351..a9d16bede 100644 --- a/.evergreen/config/generated/test-variant/full-php-8.3.yml +++ b/.evergreen/config/generated/test-variant/full-php-8.3.yml @@ -14,10 +14,10 @@ buildvariants: - variant: "build-debian12" name: "build-php-8.3" tasks: - - ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - "test_serverless_task_group" - "test_serverless_proxy_task_group" - "test-atlas-data-lake" @@ -36,10 +36,10 @@ buildvariants: name: "build-php-8.3" tasks: # Remember to add new major versions here as they are released - - ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" - - ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" - - ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" - - ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" # Test versions < 5.0 - name: test-debian92-php-8.3-local diff --git a/.evergreen/config/generated/test/local-3.6.yml b/.evergreen/config/generated/test/local-3.6.yml deleted file mode 100644 index 45272379b..000000000 --- a/.evergreen/config/generated/test/local-3.6.yml +++ /dev/null @@ -1,34 +0,0 @@ -# This file is generated automatically - please edit the "templates/test/local.yml" template file instead. -tasks: - - name: "test-mongodb-3.6-standalone-noauth-nossl" - tags: ["standalone", "local", "3.6", "tag"] - commands: - - func: "bootstrap mongo-orchestration" - vars: - TOPOLOGY: "server" - MONGODB_VERSION: "3.6" - - func: "start kms servers" - - func: "set aws temp creds" - - func: "run tests" - - - name: "test-mongodb-3.6-replicaset-noauth-nossl" - tags: ["replicaset", "local", "3.6", "pr", "tag"] - commands: - - func: "bootstrap mongo-orchestration" - vars: - TOPOLOGY: "replica_set" - MONGODB_VERSION: "3.6" - - func: "start kms servers" - - func: "set aws temp creds" - - func: "run tests" - - - name: "test-mongodb-3.6-sharded-noauth-nossl" - tags: ["sharded", "local", "3.6", "tag"] - commands: - - func: "bootstrap mongo-orchestration" - vars: - TOPOLOGY: "sharded_cluster" - MONGODB_VERSION: "3.6" - - func: "start kms servers" - - func: "set aws temp creds" - - func: "run tests" diff --git a/.evergreen/config/templates/test-variant/legacy-php-full.yml b/.evergreen/config/templates/test-variant/legacy-php-full.yml index 363923649..cec894a25 100644 --- a/.evergreen/config/templates/test-variant/legacy-php-full.yml +++ b/.evergreen/config/templates/test-variant/legacy-php-full.yml @@ -15,10 +15,10 @@ buildvariants: name: "build-php-%phpVersion%" tasks: # Remember to add new major versions here as they are released - - ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0" - - ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0" - - ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0" - - ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.8.0" + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.8.0" - "test_serverless_task_group" - "test_serverless_proxy_task_group" - "test-atlas-data-lake" diff --git a/.evergreen/config/templates/test-variant/lowest.yml b/.evergreen/config/templates/test-variant/lowest.yml index 9db3d3fb9..6ee5a5755 100644 --- a/.evergreen/config/templates/test-variant/lowest.yml +++ b/.evergreen/config/templates/test-variant/lowest.yml @@ -12,4 +12,4 @@ buildvariants: - variant: "build-debian92" name: "build-php-%phpVersion%-lowest" tasks: - - ".replicaset .local .3.6 !.csfle" + - ".replicaset .local .4.0 !.csfle" diff --git a/.evergreen/config/templates/test-variant/modern-php-full.yml b/.evergreen/config/templates/test-variant/modern-php-full.yml index 12e50aa9d..3b266c270 100644 --- a/.evergreen/config/templates/test-variant/modern-php-full.yml +++ b/.evergreen/config/templates/test-variant/modern-php-full.yml @@ -13,10 +13,10 @@ buildvariants: - variant: "build-debian12" name: "build-php-%phpVersion%" tasks: - - ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - "test_serverless_task_group" - "test_serverless_proxy_task_group" - "test-atlas-data-lake" @@ -35,10 +35,10 @@ buildvariants: name: "build-php-%phpVersion%" tasks: # Remember to add new major versions here as they are released - - ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" - - ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" - - ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" - - ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest" # Test versions < 5.0 - name: test-debian92-php-%phpVersion%-local diff --git a/.evergreen/config/templates/test-variant/phpc.yml b/.evergreen/config/templates/test-variant/phpc.yml index a85934da2..be368296a 100644 --- a/.evergreen/config/templates/test-variant/phpc.yml +++ b/.evergreen/config/templates/test-variant/phpc.yml @@ -12,10 +12,10 @@ buildvariants: - variant: "build-debian12" name: "build-php-%phpVersion%-next-stable" tasks: - - ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - "test_serverless_task_group" - "test_serverless_proxy_task_group" - "test-atlas-data-lake" @@ -32,10 +32,10 @@ buildvariants: - variant: "build-debian12" name: "build-php-%phpVersion%-next-minor" tasks: - - ".standalone .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - "test_serverless_task_group" - "test_serverless_proxy_task_group" - "test-atlas-data-lake" From 0e6f721a06f5f87c9cb074c5d3b3d1500a336277 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Mon, 15 Jul 2024 13:31:50 +0200 Subject: [PATCH 2/2] Remove wire version checks for MongoDB 3.6 --- src/Operation/Explain.php | 7 ------- src/Operation/Watch.php | 7 ------- tests/Operation/WatchFunctionalTest.php | 12 ------------ 3 files changed, 26 deletions(-) diff --git a/src/Operation/Explain.php b/src/Operation/Explain.php index c3b3fa526..e90278a73 100644 --- a/src/Operation/Explain.php +++ b/src/Operation/Explain.php @@ -28,7 +28,6 @@ use function current; use function is_array; use function is_string; -use function MongoDB\server_supports_feature; /** * Operation for the explain command. @@ -42,8 +41,6 @@ class Explain implements Executable public const VERBOSITY_EXEC_STATS = 'executionStats'; public const VERBOSITY_QUERY = 'queryPlanner'; - private const WIRE_VERSION_FOR_AGGREGATE = 7; - private string $databaseName; private Explainable $explainable; @@ -106,10 +103,6 @@ public function __construct(string $databaseName, Explainable $explainable, arra */ public function execute(Server $server) { - if ($this->explainable instanceof Aggregate && ! server_supports_feature($server, self::WIRE_VERSION_FOR_AGGREGATE)) { - throw UnsupportedException::explainNotSupported(); - } - $cursor = $server->executeCommand($this->databaseName, $this->createCommand(), $this->createOptions()); if (isset($this->options['typeMap'])) { diff --git a/src/Operation/Watch.php b/src/Operation/Watch.php index f38bb2c00..99e0f0380 100644 --- a/src/Operation/Watch.php +++ b/src/Operation/Watch.php @@ -47,7 +47,6 @@ use function MongoDB\Driver\Monitoring\removeSubscriber; use function MongoDB\is_document; use function MongoDB\select_server; -use function MongoDB\server_supports_feature; /** * Operation for creating a change stream with the aggregate command. @@ -69,8 +68,6 @@ class Watch implements Executable, /* @internal */ CommandSubscriber public const FULL_DOCUMENT_BEFORE_CHANGE_WHEN_AVAILABLE = 'whenAvailable'; public const FULL_DOCUMENT_BEFORE_CHANGE_REQUIRED = 'required'; - private const WIRE_VERSION_FOR_START_AT_OPERATION_TIME = 7; - private Aggregate $aggregate; private array $aggregateOptions; @@ -470,10 +467,6 @@ private function shouldCaptureOperationTime(Server $server): bool return false; } - if (! server_supports_feature($server, self::WIRE_VERSION_FOR_START_AT_OPERATION_TIME)) { - return false; - } - return true; } } diff --git a/tests/Operation/WatchFunctionalTest.php b/tests/Operation/WatchFunctionalTest.php index fb38435cd..58b8c844c 100644 --- a/tests/Operation/WatchFunctionalTest.php +++ b/tests/Operation/WatchFunctionalTest.php @@ -33,7 +33,6 @@ use function assert; use function bin2hex; use function microtime; -use function MongoDB\server_supports_feature; use function sprintf; /** @@ -46,8 +45,6 @@ class WatchFunctionalTest extends FunctionalTestCase public const INTERRUPTED = 11601; public const NOT_PRIMARY = 10107; - private static int $wireVersionForStartAtOperationTime = 7; - private array $defaultOptions = ['maxAwaitTimeMS' => 500]; public function setUp(): void @@ -340,10 +337,6 @@ private function assertResumeAfter($expectedResumeToken, stdClass $command): voi */ public function testResumeBeforeReceivingAnyResultsIncludesStartAtOperationTime(): void { - if (! $this->isStartAtOperationTimeSupported()) { - $this->markTestSkipped('startAtOperationTime is not supported'); - } - $this->skipIfServerVersion('>=', '4.0.7', 'postBatchResumeToken takes precedence over startAtOperationTime'); $operation = new Watch($this->manager, $this->getDatabaseName(), $this->getCollectionName(), [], $this->defaultOptions); @@ -1653,11 +1646,6 @@ private function insertDocument($document): void $this->assertEquals(1, $writeResult->getInsertedCount()); } - private function isStartAtOperationTimeSupported() - { - return server_supports_feature($this->getPrimaryServer(), self::$wireVersionForStartAtOperationTime); - } - private function advanceCursorUntilValid(Iterator $iterator, $limitOnShardedClusters = 10): void { if (! $this->isShardedCluster()) {