mongodb-bundle
mongodb-bundle copied to clipboard
Allow customizing URI options more
This PR resolve the issue https://github.com/facile-it/mongodb-bundle/issues/125
Hi, sorry, but do you have time to finish the pull request? Thank you so much
Hi, I'll try to complete it in the next few weeks
Thank you so much!
Hey @bruno-buiret, thank you for opening the issue, we're almost there.
Before merging this, would you give use some feedback? Does this satisfy all your needs?
You can install it with:
composer require facile-it/mongodb-bundle:dev-allow_customizing_URI_options_more
The branch is rebased on 1.6.2 so that everything is up to date.
Thank you in advance
@ilario-pierbattista, so sorry, work has been kind of hectic.
I just created a basic Symfony 7.2 application with PHP 8.4 and added the bundle with the Composer command you provided. I was able to customize the appname parameter and it showed in $currentOp, so thanks!
A few questions if I may,
- Would it be possible to have the client's name as a second parameter so that logic can be different according to the client being built?
interface UriOptionsInterface
{
/**
* ...
*/
public function buildUriOptions(array $clientConfiguration, string $clientName): array;
}
- Is it normal that for
DriverOptionsInterfacethe full$confis used as a parameter instead of only$conf['driverOptions']in\Facile\MongoDbBundle\Services\ClientRegistry::buildClientConfiguration()?
$conf['driverOptions'] = [];
if ($this->driverOptionsService instanceof DriverOptionsInterface) {
$conf['driverOptions'] = $this->driverOptionsService->buildDriverOptions($conf);
}
- If it's possible to add the client's name for
UriOptionsInterface, it would be quite cool to have it forDriverOptionsInterfacetoo ^^
Thank you so much for this and I hope this help!