Skip to content

Import issue with Facade #1868

Closed
Closed
@podcasthosting

Description

@podcasthosting

First off thank you for this great library!

In vendor/jenssegers/mongodb/src/Jenssegers/Mongodb/MongodbQueueServiceProvider.php you changed line 16

if (config('queue.failed.database') == 'mongodb') {

in version 3.6.0 to

if (DB::connection(config('queue.failed.database'))->getDriverName() == 'mongodb') {

in version 3.6.1 (line 17).

You import the DB facade with the statement

use DB;

causing a conflict in my application with a legacy class named DB that does not use a namespace.

It causes a

Cannot declare class, because the name is already in use

Could you please change the import to the complete path:

use Illuminate\Support\Facades\DB;

which solves the issue.

I´d appreciate that very much. Thank you!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions