Skip to content

Commit a01f3cf

Browse files
authored
PHPLIB-1305 Support "codec" option in listSearchIndexes() (#1190)
1 parent 22e99b8 commit a01f3cf

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Operation/ListSearchIndexes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function __construct(string $databaseName, string $collectionName, array
6363
$this->databaseName = $databaseName;
6464
$this->collectionName = $collectionName;
6565
$this->listSearchIndexesOptions = array_intersect_key($options, ['name' => 1]);
66-
$this->aggregateOptions = array_intersect_key($options, ['batchSize' => 1, 'collation' => 1, 'comment' => 1, 'maxTimeMS' => 1, 'readConcern' => 1, 'readPreference' => 1, 'session' => 1, 'typeMap' => 1]);
66+
$this->aggregateOptions = array_intersect_key($options, ['batchSize' => 1, 'codec' => 1, 'collation' => 1, 'comment' => 1, 'maxTimeMS' => 1, 'readConcern' => 1, 'readPreference' => 1, 'session' => 1, 'typeMap' => 1]);
6767

6868
$this->aggregate = $this->createAggregate();
6969
}

tests/Operation/ListSearchIndexesTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public function provideInvalidConstructorOptions(): array
2828
$options[][] = ['batchSize' => $value];
2929
}
3030

31+
$options[][] = ['codec' => 'foo'];
32+
3133
return $options;
3234
}
3335
}

0 commit comments

Comments
 (0)