File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -413,7 +413,9 @@ public function updateDocumentSearchIndexes(string $documentName): void
413
413
414
414
$ definedNames = array_column ($ searchIndexes , 'name ' );
415
415
try {
416
- $ existingNames = array_column (iterator_to_array ($ collection ->listSearchIndexes ()), 'name ' );
416
+ /* The typeMap option can be removed when bug is fixed in the minimum required version.
417
+ * https://jira.mongodb.org/browse/PHPLIB-1548 */
418
+ $ existingNames = array_column (iterator_to_array ($ collection ->listSearchIndexes (['typeMap ' => ['root ' => 'array ' ]])), 'name ' );
417
419
} catch (CommandException $ e ) {
418
420
/* If $listSearchIndexes doesn't exist, only throw if search indexes have been defined.
419
421
* If no search indexes are defined and the server doesn't support search indexes, there's
@@ -465,7 +467,9 @@ public function deleteDocumentSearchIndexes(string $documentName): void
465
467
$ collection = $ this ->dm ->getDocumentCollection ($ class ->name );
466
468
467
469
try {
468
- $ searchIndexes = $ collection ->listSearchIndexes ();
470
+ /* The typeMap option can be removed when bug is fixed in the minimum required version.
471
+ * https://jira.mongodb.org/browse/PHPLIB-1548 */
472
+ $ searchIndexes = $ collection ->listSearchIndexes (['typeMap ' => ['root ' => 'array ' ]]);
469
473
} catch (CommandException $ e ) {
470
474
// If the server does not support search indexes, there are no indexes to remove in any case
471
475
if ($ this ->isSearchIndexCommandException ($ e )) {
Original file line number Diff line number Diff line change 184
184
<code ><![CDATA[ array]]> </code >
185
185
</LessSpecificImplementedReturnType >
186
186
</file >
187
+ <file src =" lib/Doctrine/ODM/MongoDB/SchemaManager.php" >
188
+ <InvalidArgument >
189
+ <code ><![CDATA[ ['typeMap' => ['root' => 'array']]]]> </code >
190
+ <code ><![CDATA[ ['typeMap' => ['root' => 'array']]]]> </code >
191
+ </InvalidArgument >
192
+ </file >
187
193
<file src =" lib/Doctrine/ODM/MongoDB/Tools/Console/Command/ClearCache/MetadataCommand.php" >
188
194
<UndefinedInterfaceMethod >
189
195
<code ><![CDATA[ getDocumentManager]]> </code >
You can’t perform that action at this time.
0 commit comments