protected function retrieveDependency(ContainerInterface $container, $configKey, $section, $factoryClassName)
{
$containerKey = sprintf('doctrine.%s.%s', $section, $configKey);
if ($container->has($containerKey)) {
return $container->get($containerKey);
}
return (new $factoryClassName($configKey))->__invoke($container);
}