-
-
Notifications
You must be signed in to change notification settings - Fork 45
Enhacement DatabaseFactory for master and slave. #107
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
Conversation
|
I don't like it. Let's avoid lazy initializing via |
In this particular case the factory avoids two things, one injecting the dependencies, and two possibility of creating dynamic connections, if I define everything in the container di that cannot be done. |
|
Is connection possible without DSN? |
You can create the Line 689 in aad933b
The idea for now is to clean the constructor as much as possible, in order to inject the interfaces of Creating the connection class does not mean that you create the instance of Having a DSN setter also allows you to have a connection created and to be able to access any connection dynamically, that is also an advantage. I would have no problem adding more tests where we checked the exception without configuration of |
|
If we can't use Connection without DSN, it's better to have it as a mandatory requirement i.e. keep it in constructor. |
Its mandatory for |
|
Thanks! |
Example:
Example Array:
Example string: