Skip to content

Commit da3a46a

Browse files
authored
PHPORM-263 Fix deprecation message for collection/table config in MongoDBQueueServiceProvider (#3209)
1 parent 05a090b commit da3a46a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: src/MongoDBQueueServiceProvider.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ protected function registerFailedJobServices()
5454
*/
5555
protected function mongoFailedJobProvider(array $config): MongoFailedJobProvider
5656
{
57-
if (! isset($config['collection']) && isset($config['table'])) {
58-
trigger_error('Since mongodb/laravel-mongodb 4.4: Using "table" option for the queue is deprecated. Use "collection" instead.', E_USER_DEPRECATED);
59-
$config['collection'] = $config['table'];
57+
if (! isset($config['table']) && isset($config['collection'])) {
58+
trigger_error('Since mongodb/laravel-mongodb 4.4: Using "collection" option for the queue is deprecated. Use "table" instead.', E_USER_DEPRECATED);
59+
$config['table'] = $config['collection'];
6060
}
6161

6262
return new MongoFailedJobProvider(
6363
$this->app['db'],
6464
$config['database'] ?? null,
65-
$config['collection'] ?? 'failed_jobs',
65+
$config['table'] ?? 'failed_jobs',
6666
);
6767
}
6868
}

0 commit comments

Comments
 (0)