Skip to content

Commit 7a08cc3

Browse files
authored
RUBY-3588 Deprecate Support for Server Version 4.0 (#2980)
* RUBY-3552 Deprecate support for server version 3.6 Adds a new Mongo::Deprecations module as well * feedback from copilot * extend, not include (for Ruby 2.7) * RUBY-3588 deprecate server version 4.0 * reverse the prefix-match logic so it actually works
1 parent 354432c commit 7a08cc3

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

lib/mongo/server/description/features.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class Features
104104
#
105105
# If there are no currently-deprecated wire versions, this should be
106106
# set to an empty range (e.g. the EMPTY_RANGE constant).
107-
DEPRECATED_WIRE_VERSIONS = 6..6
107+
DEPRECATED_WIRE_VERSIONS = 6..7
108108

109109
# make sure the deprecated versions are valid
110110
if DEPRECATED_WIRE_VERSIONS.min

spec/mongo/server/description/features_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,4 +291,10 @@
291291
end
292292
end
293293
end
294+
295+
[ 6, 7 ].each do |deprecated_wire_version|
296+
it "declares wire version #{deprecated_wire_version} as deprecated" do
297+
expect(described_class::DEPRECATED_WIRE_VERSIONS).to include(deprecated_wire_version)
298+
end
299+
end
294300
end

0 commit comments

Comments
 (0)