Skip to content
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

Closed
wants to merge 5 commits into from
Closed

More connections #47

wants to merge 5 commits into from

Conversation

aleswita
Copy link
Member

@aleswita aleswita commented Feb 25, 2019

refactor of PR: #17

Closes #36

$this->prefix('@entityManagerDecorator'),
]);
foreach ($builder->findByType(\Doctrine\DBAL\Connection::class) as $definitionName => $serviceDefinition) {
$match = Strings::match($definitionName, '~([a-zA-Z]+\.([a-zA-Z]+))\.connection~');
Copy link
Contributor

@mabar mabar Apr 5, 2019

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.

Copy link
Member Author

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?

Copy link
Contributor

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.

])
->setAutowired(false);

$autowired = $name === \Nettrine\DBAL\DI\DbalExtension::DEFAULT_CONNECTION_NAME ? true : false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$serviceDefinition->isAutowired()

@mabar
Copy link
Contributor

mabar commented Apr 5, 2019

Edit also note about multiple connections please https://github.com/nettrine/orm/blob/master/.docs/README.md#configuration

@aleswita
Copy link
Member Author

aleswita commented Apr 5, 2019

@mabar look on diff

@mabar
Copy link
Contributor

mabar commented Apr 5, 2019

Looks much better 👍

@AliAmjid
Copy link

Will it be merged this ?

@f3l1x
Copy link
Member

f3l1x commented Jul 23, 2019

@AliAmjid Hi, it requires more time to do handle it. Please be patient.

@JosefDohnal
Copy link

Hi. We use multiple connections in several projects (Kdyby). When can we expect merge, please? Thank you!

@haltuf
Copy link

haltuf commented Aug 22, 2019

Hi, may I help you with this PR in any possible way (e.g. more testing or anything else)?

@f3l1x
Copy link
Member

f3l1x commented Aug 22, 2019

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?

@haltuf
Copy link

haltuf commented Aug 23, 2019

@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...)
If I find anything usable, I'll let you know.

@mstefan21
Copy link

Hi, any update? When Nettrine can handle more connections? @f3l1x

@f3l1x
Copy link
Member

f3l1x commented Apr 2, 2020

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.

@zddors
Copy link

zddors commented Mar 24, 2021

Hi, excuse my question. Can we expect more connections in Nettrine in the near future?

@Michal-Szekeres
Copy link

Hi, is there any update on "more connections" or can we expect any update in near future?
@f3l1x

@f3l1x
Copy link
Member

f3l1x commented Jan 16, 2023

Successor #101

@f3l1x f3l1x closed this Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Multiple database connections
9 participants