Skip to content

Commit

Permalink
Merge pull request #2152 from CurosMJ/fix/remove-facade-use-3.8
Browse files Browse the repository at this point in the history
[3.8] Remove Facade in Queue Service Provider
  • Loading branch information
divine authored Dec 17, 2020
2 parents 958c4ed + 7b1ae26 commit 7f6fffd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [3.8.2] - 2020-12-17

### Changed
- MongodbQueueServiceProvider does not use the DB Facade anymore [#2149](https://github.com/jenssegers/laravel-mongodb/pull/2149) by [@curosmj](https://github.com/curosmj)

### Added
- Laravel 8 support by [@divine](https://github.com/divine).

Expand Down
3 changes: 1 addition & 2 deletions src/Jenssegers/Mongodb/MongodbQueueServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Jenssegers\Mongodb;

use Illuminate\Support\Facades\DB;
use Illuminate\Queue\QueueServiceProvider;
use Jenssegers\Mongodb\Queue\Failed\MongoFailedJobProvider;

Expand All @@ -14,7 +13,7 @@ class MongodbQueueServiceProvider extends QueueServiceProvider
protected function registerFailedJobServices()
{
// Add compatible queue failer if mongodb is configured.
if (DB::connection(config('queue.failed.database'))->getDriverName() == 'mongodb') {
if ($this->app['db']->connection(config('queue.failed.database'))->getDriverName() == 'mongodb') {
$this->app->singleton('queue.failer', function ($app) {
return new MongoFailedJobProvider($app['db'], config('queue.failed.database'), config('queue.failed.table'));
});
Expand Down

0 comments on commit 7f6fffd

Please sign in to comment.