Open
Description
- Laravel-mongodb Version: 4.1
- PHP Version: 8.3
- Database Driver & Version: 4
Description:
Register the Mongo driver through the make function instead of resolving functiong
If db is instantiated in another package, then the callback function registered through resolving function will not be executed, which is a hidden BUG.
This problem does not occur stably, only if a package is sorted by the composer and executes its own provider before the laravel-mongodb provider, and exactly instantiates db.
In my project, the following code exists in other packages, which can lead to problems. Because db is instantiated in advance:
Problems caused by,there is an error:
Unsupported driver [mongodb]. - InvalidArgumentException