Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-1227

Use void return types for operations without meaningful result document

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.0.0
    • Affects Version/s: None
    • Component/s: CRUD
    • None
    • Needed
    • Hide

      Update reference for the modified operations.

      Show
      Update reference for the modified operations.

      After discussion on return type of search index drop/update operations, it was decided that it should be void.

      It's inconsistent to return profiling information only when there is nothing else. There are events for that.

      • ok is always 1, I suppose there is always an exception in case of error.
      • $clusterTime is in the session
      • operationTime is typically for profiling. So use MongoDB\Driver\Monitoring\CommandSubscriber for that.

       

      Modify the return type of the following operations to void:

      • CreateCollection
      • CreateEncryptedCollection
      • DropCollection
      • DropDatabase
      • DropEncryptedCollection
      • DropIndexes
      • DropSearchIndex (already void)
      • ModifyCollection
      • RenameCollection
      • UpdateSearchIndex (already void)

      This is a breaking change for version 2.0

            Assignee:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Reporter:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: