-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
More connections #47
More connections #47
Conversation
src/DI/OrmExtension.php
Outdated
$this->prefix('@entityManagerDecorator'), | ||
]); | ||
foreach ($builder->findByType(\Doctrine\DBAL\Connection::class) as $definitionName => $serviceDefinition) { | ||
$match = Strings::match($definitionName, '~([a-zA-Z]+\.([a-zA-Z]+))\.connection~'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it would work only if connection is defined with name matching this regex? Seems like hidden dependency on Nettrine\DBAL\DI\DbalExtension for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mabar any another idea, how to get connection name from DBAL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$definitionName
is all you need.
src/DI/OrmExtension.php
Outdated
]) | ||
->setAutowired(false); | ||
|
||
$autowired = $name === \Nettrine\DBAL\DI\DbalExtension::DEFAULT_CONNECTION_NAME ? true : false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$serviceDefinition->isAutowired()
Edit also note about multiple connections please https://github.com/nettrine/orm/blob/master/.docs/README.md#configuration |
@mabar look on diff |
Looks much better 👍 |
Will it be merged this ? |
@AliAmjid Hi, it requires more time to do handle it. Please be patient. |
Hi. We use multiple connections in several projects (Kdyby). When can we expect merge, please? Thank you! |
Hi, may I help you with this PR in any possible way (e.g. more testing or anything else)? |
Hi guys. Thing is it's more complicated, it goes over dbal, tracy panel, to orm, autowiring and ends in console. This all must be rock solid. Testing would be great. @JosefDohnal @haltuf Can you please test the whole stack (described above)? And rewrite what is working and what doesn't? |
@f3l1x I've started digging to the PRs and you're right, things are much more complicated than I thought initially. (plus, among others, it introduces some BC changes that I think may not be necessary...) |
Hi, any update? When Nettrine can handle more connections? @f3l1x |
Hi @mstefan21. It's complex task, we don't have any ETA. At this point we're collecting feedback and preparing some funding for this big task. |
Hi, excuse my question. Can we expect more connections in Nettrine in the near future? |
Hi, is there any update on "more connections" or can we expect any update in near future? |
Successor #101 |
refactor of PR: #17
Closes #36