-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Import issue with Facade #1868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please see updated issue. Sorry, I hit the send button accidentally. |
Is this facade occur error? |
Sorry, I do not understand your question. Yes, this causes an error as described above. |
I install version |
As I wrote it conflicts with a legacy class called DB that is not using a namespace. Just add a class
to your code and you´ll see. |
and successfully use this class and |
I cannot modify the class because it comes from a library (Pear DB). Why can´t you just modify the import statement to the full path as outlined above? |
PR mongodb#1851 had incorrect class import, we need to define correct path, see issue mongodb#1868
Hi @podcasthosting, Sorry about late fix, I've pushed a PR #1968 it will be merged and new version released as well. Thank you! |
PR mongodb/laravel-mongodb#1851 had incorrect class import, we need to define correct path, see issue mongodb/laravel-mongodb#1868
PR mongodb/laravel-mongodb#1851 had incorrect class import, we need to define correct path, see issue mongodb/laravel-mongodb#1868
PR mongodb/laravel-mongodb#1851 had incorrect class import, we need to define correct path, see issue mongodb/laravel-mongodb#1868
PR mongodb/laravel-mongodb#1851 had incorrect class import, we need to define correct path, see issue mongodb/laravel-mongodb#1868
PR mongodb#1851 had incorrect class import, we need to define correct path, see issue mongodb#1868
PR mongodb/laravel-mongodb#1851 had incorrect class import, we need to define correct path, see issue mongodb/laravel-mongodb#1868
PR mongodb/laravel-mongodb#1851 had incorrect class import, we need to define correct path, see issue mongodb/laravel-mongodb#1868
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!
The text was updated successfully, but these errors were encountered: