You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I make a database connection using DB::build(), if that connection fails due to a lost connection, the DatabaseManager tries to reconnect but I receive the following error.
The problem on the DatabaseManager is that the refreshPdoConnections() method calls the makeConnection() method which attempts to get the config from the config/database.php. Since the connection is built on the fly and does not exists on the config file, it throws an InvalidArgumentException.
As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.
If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.
Laravel Version
11.35.1
PHP Version
8.3.13
Database Driver & Version
MariaDB 10.11.10
Description
When I make a database connection using
DB::build()
, if that connection fails due to a lost connection, the DatabaseManager tries to reconnect but I receive the following error.Steps To Reproduce
Create an on-demand database connection:
The text was updated successfully, but these errors were encountered: