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
Initiate a new Db object using a PDO object: $db = new Db($existingPdo);
Now disconnect: $db->disconnect();
What happens now next time $db->connect() is called? No pdo OR dsn is available
Will probably lead to an unexpected Exception of some sort when a new PDO object is trying to get created when just null will be sent in as dsn, username and password, no?
Solution
I suggest the following to solve this issue in the long term:
allow only PDO object to be passed into the container in a version 1.0.0
deprecate usage of the two other approaches now
add static replacement methods to support creating a Db instance by passing in a dns or host, username password and options
refactor and the fix the connection issue described above
The text was updated successfully, but these errors were encountered:
lordrhodos
changed the title
Constructor acception mixed values leads to bug
Constructor accepts mixed values which leads to bug
Feb 21, 2019
Problem
As discussed earlier today the following flow will create a bug
quote from @felixsand earlier in slack today
Solution
I suggest the following to solve this issue in the long term:
1.0.0
Db
instance by passing in a dns or host, username password and optionsThe text was updated successfully, but these errors were encountered: