Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-3656

BSON::Document#deep_symbolize_keys! should NOT be implemented

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • bson-6.0.0
    • Affects Version/s: bson-4.15.1, bson-5.1.0
    • Component/s: BSON
    • None
    • Ruby Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Per https://github.com/mongodb/bson-ruby/pull/346 – BSON::Document explicitly fails when symbolize_keys! is called (instructing you to convert the document to a hash first), but deep_symbolize_keys! is not similarly forbidden.

      As this is a breaking change (removing a function from the public API, even though it was never intentionally part of the public API), it needs to be part of an eventual 6.0 release.

      The OP is adjusting the proposed PR to issue a deprecation warning instead, for now, but when it's time for 6.0, we should explicitly remove deep_symbolize_keys! from the BSON::Document interface (similar to how we did for symbolize_keys!).

            Assignee:
            Unassigned Unassigned
            Reporter:
            jamis.buck@mongodb.com Jamis Buck
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: