You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Client.php
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -228,6 +228,8 @@ public function dropDatabase(string $databaseName, array $options = [])
228
228
{
229
229
if (! isset($options['typeMap'])) {
230
230
$options['typeMap'] = $this->typeMap;
231
+
} else {
232
+
@trigger_error(sprintf('The function %s() will return nothing in mongodb/mongodb v2.0, the "typeMap" option is deprecated', __FUNCTION__), E_USER_DEPRECATED);
if ($deprecatedFunction && isset($options['typeMap'])) {
1218
+
@trigger_error(sprintf('The function %s() will return nothing in mongodb/mongodb v2.0, the "typeMap" option is deprecated', $deprecatedFunction), E_USER_DEPRECATED);
1219
+
}
1220
+
1217
1221
// Only inherit the type map if no codec is used
1218
1222
if (! isset($options['typeMap']) && ! isset($options['codec'])) {
Copy file name to clipboardExpand all lines: src/Database.php
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -286,6 +286,8 @@ public function createCollection(string $collectionName, array $options = [])
286
286
{
287
287
if (! isset($options['typeMap'])) {
288
288
$options['typeMap'] = $this->typeMap;
289
+
} else {
290
+
@trigger_error(sprintf('The function %s() will return nothing in mongodb/mongodb v2.0, the "typeMap" option is deprecated', __FUNCTION__), E_USER_DEPRECATED);
289
291
}
290
292
291
293
if (! isset($options['writeConcern']) && ! is_in_transaction($options)) {
@@ -329,6 +331,8 @@ public function createEncryptedCollection(string $collectionName, ClientEncrypti
329
331
{
330
332
if (! isset($options['typeMap'])) {
331
333
$options['typeMap'] = $this->typeMap;
334
+
} else {
335
+
@trigger_error(sprintf('The function %s() will return nothing in mongodb/mongodb v2.0, the "typeMap" option is deprecated', __FUNCTION__), E_USER_DEPRECATED);
332
336
}
333
337
334
338
if (! isset($options['writeConcern']) && ! is_in_transaction($options)) {
@@ -362,6 +366,8 @@ public function drop(array $options = [])
362
366
{
363
367
if (! isset($options['typeMap'])) {
364
368
$options['typeMap'] = $this->typeMap;
369
+
} else {
370
+
@trigger_error(sprintf('The function %s() will return nothing in mongodb/mongodb v2.0, the "typeMap" option is deprecated', __FUNCTION__), E_USER_DEPRECATED);
@@ -390,6 +396,8 @@ public function dropCollection(string $collectionName, array $options = [])
390
396
{
391
397
if (! isset($options['typeMap'])) {
392
398
$options['typeMap'] = $this->typeMap;
399
+
} else {
400
+
@trigger_error(sprintf('The function %s() will return nothing in mongodb/mongodb v2.0, the "typeMap" option is deprecated', __FUNCTION__), E_USER_DEPRECATED);
0 commit comments