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

Remove obsolete handling of "options" arg for insertMany

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.15.0
    • Affects Version/s: None
    • Component/s: None

      The original PR for PHPLIB-493 inadvertently preserved some obsolete code for handling an "options" argument for insertMany:

      case 'insertMany':
          // Merge nested and top-level options (see: SPEC-1158)
          $options = isset($args['options']) ? (array) $args['options'] : [];
          $options += array_diff_key($args, ['documents' => 1]);
      
          return $collection->insertMany(
              $args['documents'],
              $options
          );
      

      This should be removed, as no unified spec tests use an "options" argument (per Expressing Required and Optional Parameters).

            Assignee:
            levon.babayan@mongodb.com Levon Babayan (Inactive)
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: