Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-2412

Deprecate CursorId class and conditionally return Int64 in Cursor::getId()

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.20.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • PHP Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The CursorId class is slated for removal in 2.0, with CursorInterface::getId and Cursor::getId returning an Int64 instance. The CursorId class must be deprecated, and the tentative return types for CursorInterface::getId changed to Int64. While we could theoretically use the inheritance chain to soften the BC break, we don't consider this API to be used widely, so announcing the change and making a hard break in 2.0 is acceptable.

      This will add an $asInt64 argument to Cursor::getId() to return an Int64. By default, the method will continue to return an CursorId but emit a deprecation notice when doing so.

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            andreas.braun@mongodb.com Andreas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: