Skip to content
This repository
Browse code

Rename doctrine.odm.mongodb to doctrine_mongodb.odm

  • Loading branch information...
commit 66c5f0d31ec5f85994144014ff0024dbfa74b40f 1 parent aa03541
Henrik Bjørnskov authored July 24, 2012
13  CHANGELOG-2.1.md
Source Rendered
@@ -7,15 +7,20 @@ in 2.1 minor versions.
7 7
 2.1.0
8 8
 -----
9 9
 
  10
+### Services
  11
+
  12
+ * The id for referencing the registry have been changed from `doctrine.odm.mongodb`
  13
+   to `doctrine_mongodb`.
  14
+
10 15
 ### Events
11 16
 
12 17
  * The format for naming event manager services is now
13  
-   `doctrine.odm.mongodb.%s_connection.event_manager` and uses the connection
  18
+   `doctrine_mongodb.odm.%s_connection.event_manager` and uses the connection
14 19
    name. The event manager shared by the default document manager is still
15  
-   aliased as `doctrine.odm.mongodb.event_manager`.
  20
+   aliased as `doctrine_mongodb.odm.event_manager`.
16 21
  * Listeners and subscriber services must be tagged with 
17  
-   `doctrine.odm.mongodb.event_listener` and
18  
-   `doctrine.odm.mongodb.event_subscriber`, respectively. By default, listeners
  22
+   `doctrine_mongodb.odm.event_listener` and
  23
+   `doctrine_mongodb.odm.event_subscriber`, respectively. By default, listeners
19 24
    and subscribers will be registered with event managers for all connections,
20 25
    unless the `connection` attribute is specified.
21 26
  * Added `lazy` attribute to tags to request lazy loading of listener services
8  CacheWarmer/HydratorCacheWarmer.php
@@ -54,7 +54,7 @@ public function isOptional()
54 54
     public function warmUp($cacheDir)
55 55
     {
56 56
         // we need the directory no matter the hydrator cache generation strategy.
57  
-        $hydratorCacheDir = $this->container->getParameter('doctrine.odm.mongodb.hydrator_dir');
  57
+        $hydratorCacheDir = $this->container->getParameter('doctrine_mongodb.odm.hydrator_dir');
58 58
         if (!file_exists($hydratorCacheDir)) {
59 59
             if (false === @mkdir($hydratorCacheDir, 0777, true)) {
60 60
                 throw new \RuntimeException(sprintf('Unable to create the Doctrine Hydrator directory (%s)', dirname($hydratorCacheDir)));
@@ -64,16 +64,16 @@ public function warmUp($cacheDir)
64 64
         }
65 65
 
66 66
         // if hydrators are autogenerated we don't need to generate them in the cache warmer.
67  
-        if ($this->container->getParameter('doctrine.odm.mongodb.auto_generate_hydrator_classes') === true) {
  67
+        if ($this->container->getParameter('doctrine_mongodb.odm.auto_generate_hydrator_classes') === true) {
68 68
             return;
69 69
         }
70 70
 
71 71
         /* @var $registry \Doctrine\Common\Persistence\ManagerRegistry */
72  
-        $registry = $this->container->get('doctrine.odm.mongodb');
  72
+        $registry = $this->container->get('doctrine_mongodb');
73 73
         foreach ($registry->getManagers() as $dm) {
74 74
             /* @var $dm \Doctrine\ODM\MongoDB\DocumentManager */
75 75
             $classes = $dm->getMetadataFactory()->getAllMetadata();
76 76
             $dm->getHydratorFactory()->generateHydratorClasses($classes);
77 77
         }
78 78
     }
79  
-}
  79
+}
8  CacheWarmer/ProxyCacheWarmer.php
@@ -54,7 +54,7 @@ public function isOptional()
54 54
     public function warmUp($cacheDir)
55 55
     {
56 56
         // we need the directory no matter the proxy cache generation strategy.
57  
-        $proxyCacheDir = $this->container->getParameter('doctrine.odm.mongodb.proxy_dir');
  57
+        $proxyCacheDir = $this->container->getParameter('doctrine_mongodb.odm.proxy_dir');
58 58
         if (!file_exists($proxyCacheDir)) {
59 59
             if (false === @mkdir($proxyCacheDir, 0777, true)) {
60 60
                 throw new \RuntimeException(sprintf('Unable to create the Doctrine Proxy directory (%s)', dirname($proxyCacheDir)));
@@ -64,16 +64,16 @@ public function warmUp($cacheDir)
64 64
         }
65 65
 
66 66
         // if proxies are autogenerated we don't need to generate them in the cache warmer.
67  
-        if ($this->container->getParameter('doctrine.odm.mongodb.auto_generate_proxy_classes') === true) {
  67
+        if ($this->container->getParameter('doctrine_mongodb.odm.auto_generate_proxy_classes') === true) {
68 68
             return;
69 69
         }
70 70
 
71 71
         /* @var $registry \Doctrine\Common\Persistence\ManagerRegistry */
72  
-        $registry = $this->container->get('doctrine.odm.mongodb');
  72
+        $registry = $this->container->get('doctrine_mongodb');
73 73
         foreach ($registry->getManagers() as $dm) {
74 74
             /* @var $dm \Doctrine\ODM\MongoDB\DocumentManager */
75 75
             $classes = $dm->getMetadataFactory()->getAllMetadata();
76 76
             $dm->getProxyFactory()->generateProxyClasses($classes);
77 77
         }
78 78
     }
79  
-}
  79
+}
4  Command/DoctrineODMCommand.php
@@ -30,7 +30,7 @@
30 30
 {
31 31
     public static function setApplicationDocumentManager(Application $application, $dmName)
32 32
     {
33  
-        $dm = $application->getKernel()->getContainer()->get('doctrine.odm.mongodb')->getManager($dmName);
  33
+        $dm = $application->getKernel()->getContainer()->get('doctrine_mongodb')->getManager($dmName);
34 34
         $helperSet = $application->getHelperSet();
35 35
         $helperSet->set(new DocumentManagerHelper($dm), 'dm');
36 36
     }
@@ -49,7 +49,7 @@ protected function getDocumentGenerator()
49 49
 
50 50
     protected function getDoctrineDocumentManagers()
51 51
     {
52  
-        return $this->getContainer()->get('doctrine.odm.mongodb')->getManagers();
  52
+        return $this->getContainer()->get('doctrine_mongodb')->getManagers();
53 53
     }
54 54
 
55 55
     protected function getBundleMetadatas(Bundle $bundle)
4  Command/InfoDoctrineODMCommand.php
@@ -49,10 +49,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
49 49
     {
50 50
         $documentManagerName = $input->getOption('dm') ?
51 51
             $input->getOption('dm') :
52  
-            $this->getContainer()->get('doctrine.odm.mongodb')->getDefaultManagerName();
  52
+            $this->getContainer()->get('doctrine_mongodb')->getDefaultManagerName();
53 53
 
54 54
         /* @var $documentManager Doctrine\ODM\MongoDB\DocumentManager */
55  
-        $documentManager = $this->getContainer()->get('doctrine.odm.mongodb')->getManager($documentManagerName);
  55
+        $documentManager = $this->getContainer()->get('doctrine_mongodb')->getManager($documentManagerName);
56 56
 
57 57
         $documentClassNames = $documentManager->getConfiguration()
58 58
                                           ->getMetadataDriverImpl()
2  Command/LoadDataFixturesDoctrineODMCommand.php
@@ -56,7 +56,7 @@ protected function configure()
56 56
 
57 57
     protected function execute(InputInterface $input, OutputInterface $output)
58 58
     {
59  
-        $dm = $this->getContainer()->get('doctrine.odm.mongodb')->getManager($input->getOption('dm'));
  59
+        $dm = $this->getContainer()->get('doctrine_mongodb')->getManager($input->getOption('dm'));
60 60
         $dirOrFile = $input->getOption('fixtures');
61 61
         if ($dirOrFile) {
62 62
             $paths = is_array($dirOrFile) ? $dirOrFile : array($dirOrFile);
2  Command/TailCursorDoctrineODMCommand.php
@@ -44,7 +44,7 @@ protected function configure()
44 44
 
45 45
     protected function execute(InputInterface $input, OutputInterface $output)
46 46
     {
47  
-        $dm = $this->getContainer()->get('doctrine.odm.mongodb.document_manager');
  47
+        $dm = $this->getContainer()->get('doctrine_mongodb.odm.document_manager');
48 48
         $repository = $dm->getRepository($input->getArgument('document'));
49 49
         $repositoryReflection = new \ReflectionClass($repository);
50 50
         $documentReflection = $repository->getDocumentManager()->getMetadataFactory()->getMetadataFor($input->getArgument('document'))->getReflectionClass();
6  DependencyInjection/Compiler/CreateHydratorDirectoryPass.php
@@ -21,15 +21,15 @@ class CreateHydratorDirectoryPass implements CompilerPassInterface
21 21
 {
22 22
     public function process(ContainerBuilder $container)
23 23
     {
24  
-        if (!$container->hasParameter('doctrine.odm.mongodb.hydrator_dir')) {
  24
+        if (!$container->hasParameter('doctrine_mongodb.odm.hydrator_dir')) {
25 25
             return;
26 26
         }
27 27
         // Don't do anything if auto_generate_hydrator_classes is false
28  
-        if (!$container->getParameter('doctrine.odm.mongodb.auto_generate_hydrator_classes')) {
  28
+        if (!$container->getParameter('doctrine_mongodb.odm.auto_generate_hydrator_classes')) {
29 29
             return;
30 30
         }
31 31
         // Create document proxy directory
32  
-        $hydratorCacheDir = $container->getParameter('doctrine.odm.mongodb.hydrator_dir');
  32
+        $hydratorCacheDir = $container->getParameter('doctrine_mongodb.odm.hydrator_dir');
33 33
         if (!is_dir($hydratorCacheDir)) {
34 34
             if (false === @mkdir($hydratorCacheDir, 0777, true)) {
35 35
                 exit(sprintf('Unable to create the Doctrine Hydrator directory (%s)', dirname($hydratorCacheDir)));
6  DependencyInjection/Compiler/CreateProxyDirectoryPass.php
@@ -21,15 +21,15 @@ class CreateProxyDirectoryPass implements CompilerPassInterface
21 21
 {
22 22
     public function process(ContainerBuilder $container)
23 23
     {
24  
-        if (!$container->hasParameter('doctrine.odm.mongodb.proxy_dir')) {
  24
+        if (!$container->hasParameter('doctrine_mongodb.odm.proxy_dir')) {
25 25
             return;
26 26
         }
27 27
         // Don't do anything if auto_generate_proxy_classes is false
28  
-        if (!$container->getParameter('doctrine.odm.mongodb.auto_generate_proxy_classes')) {
  28
+        if (!$container->getParameter('doctrine_mongodb.odm.auto_generate_proxy_classes')) {
29 29
             return;
30 30
         }
31 31
         // Create document proxy directory
32  
-        $proxyCacheDir = $container->getParameter('doctrine.odm.mongodb.proxy_dir');
  32
+        $proxyCacheDir = $container->getParameter('doctrine_mongodb.odm.proxy_dir');
33 33
         if (!is_dir($proxyCacheDir)) {
34 34
             if (false === @mkdir($proxyCacheDir, 0777, true)) {
35 35
                 exit(sprintf('Unable to create the Doctrine Proxy directory (%s)', dirname($proxyCacheDir)));
76  DependencyInjection/DoctrineMongoDBExtension.php
@@ -48,13 +48,13 @@ public function load(array $configs, ContainerBuilder $container)
48 48
             $keys = array_keys($config['connections']);
49 49
             $config['default_connection'] = reset($keys);
50 50
         }
51  
-        $container->setParameter('doctrine.odm.mongodb.default_connection', $config['default_connection']);
  51
+        $container->setParameter('doctrine_mongodb.odm.default_connection', $config['default_connection']);
52 52
 
53 53
         if (empty($config['default_document_manager'])) {
54 54
             $keys = array_keys($config['document_managers']);
55 55
             $config['default_document_manager'] = reset($keys);
56 56
         }
57  
-        $container->setParameter('doctrine.odm.mongodb.default_document_manager', $config['default_document_manager']);
  57
+        $container->setParameter('doctrine_mongodb.odm.default_document_manager', $config['default_document_manager']);
58 58
 
59 59
         // set some options as parameters and unset them
60 60
         $config = $this->overrideParameters($config, $container);
@@ -91,7 +91,7 @@ protected function overrideParameters($options, ContainerBuilder $container)
91 91
 
92 92
         foreach ($overrides as $key) {
93 93
             if (isset($options[$key])) {
94  
-                $container->setParameter('doctrine.odm.mongodb.'.$key, $options[$key]);
  94
+                $container->setParameter('doctrine_mongodb.odm.'.$key, $options[$key]);
95 95
 
96 96
                 // the option should not be used, the parameter should be referenced
97 97
                 unset($options[$key]);
@@ -120,9 +120,9 @@ protected function loadDocumentManagers(array $dmConfigs, $defaultDM, $defaultDB
120 120
                 $defaultDB,
121 121
                 $container
122 122
             );
123  
-            $dms[$name] = sprintf('doctrine.odm.mongodb.%s_document_manager', $name);
  123
+            $dms[$name] = sprintf('doctrine_mongodb.odm.%s_document_manager', $name);
124 124
         }
125  
-        $container->setParameter('doctrine.odm.mongodb.document_managers', $dms);
  125
+        $container->setParameter('doctrine_mongodb.odm.document_managers', $dms);
126 126
     }
127 127
 
128 128
     /**
@@ -135,14 +135,14 @@ protected function loadDocumentManagers(array $dmConfigs, $defaultDM, $defaultDB
135 135
      */
136 136
     protected function loadDocumentManager(array $documentManager, $defaultDM, $defaultDB, ContainerBuilder $container)
137 137
     {
138  
-        $configServiceName = sprintf('doctrine.odm.mongodb.%s_configuration', $documentManager['name']);
  138
+        $configServiceName = sprintf('doctrine_mongodb.odm.%s_configuration', $documentManager['name']);
139 139
         $connectionName = isset($documentManager['connection']) ? $documentManager['connection'] : $documentManager['name'];
140 140
         $defaultDatabase = isset($documentManager['database']) ? $documentManager['database'] : $defaultDB;
141 141
 
142 142
         if ($container->hasDefinition($configServiceName)) {
143 143
             $odmConfigDef = $container->getDefinition($configServiceName);
144 144
         } else {
145  
-            $odmConfigDef = new Definition('%doctrine.odm.mongodb.configuration.class%');
  145
+            $odmConfigDef = new Definition('%doctrine_mongodb.odm.configuration.class%');
146 146
             $container->setDefinition($configServiceName, $odmConfigDef);
147 147
         }
148 148
 
@@ -150,16 +150,16 @@ protected function loadDocumentManager(array $documentManager, $defaultDM, $defa
150 150
         $this->loadObjectManagerCacheDriver($documentManager, $container, 'metadata_cache');
151 151
 
152 152
         $methods = array(
153  
-            'setMetadataCacheImpl' => new Reference(sprintf('doctrine.odm.mongodb.%s_metadata_cache', $documentManager['name'])),
154  
-            'setMetadataDriverImpl' => new Reference(sprintf('doctrine.odm.mongodb.%s_metadata_driver', $documentManager['name'])),
155  
-            'setProxyDir' => '%doctrine.odm.mongodb.proxy_dir%',
156  
-            'setProxyNamespace' => '%doctrine.odm.mongodb.proxy_namespace%',
157  
-            'setAutoGenerateProxyClasses' => '%doctrine.odm.mongodb.auto_generate_proxy_classes%',
158  
-            'setHydratorDir' => '%doctrine.odm.mongodb.hydrator_dir%',
159  
-            'setHydratorNamespace' => '%doctrine.odm.mongodb.hydrator_namespace%',
160  
-            'setAutoGenerateHydratorClasses' => '%doctrine.odm.mongodb.auto_generate_hydrator_classes%',
  153
+            'setMetadataCacheImpl' => new Reference(sprintf('doctrine_mongodb.odm.%s_metadata_cache', $documentManager['name'])),
  154
+            'setMetadataDriverImpl' => new Reference(sprintf('doctrine_mongodb.odm.%s_metadata_driver', $documentManager['name'])),
  155
+            'setProxyDir' => '%doctrine_mongodb.odm.proxy_dir%',
  156
+            'setProxyNamespace' => '%doctrine_mongodb.odm.proxy_namespace%',
  157
+            'setAutoGenerateProxyClasses' => '%doctrine_mongodb.odm.auto_generate_proxy_classes%',
  158
+            'setHydratorDir' => '%doctrine_mongodb.odm.hydrator_dir%',
  159
+            'setHydratorNamespace' => '%doctrine_mongodb.odm.hydrator_namespace%',
  160
+            'setAutoGenerateHydratorClasses' => '%doctrine_mongodb.odm.auto_generate_hydrator_classes%',
161 161
             'setDefaultDB' => $defaultDatabase,
162  
-            'setDefaultCommitOptions' => '%doctrine.odm.mongodb.default_commit_options%',
  162
+            'setDefaultCommitOptions' => '%doctrine_mongodb.odm.default_commit_options%',
163 163
             'setRetryConnect' => $documentManager['retry_connect'],
164 164
             'setRetryQuery' => $documentManager['retry_query']
165 165
         );
@@ -167,12 +167,12 @@ protected function loadDocumentManager(array $documentManager, $defaultDM, $defa
167 167
         // logging
168 168
         $loggers = array();
169 169
         if ($container->getParameterBag()->resolveValue($documentManager['logging'])) {
170  
-            $loggers[] = new Reference('doctrine.odm.mongodb.logger');
  170
+            $loggers[] = new Reference('doctrine_mongodb.odm.logger');
171 171
         }
172 172
 
173 173
         // profiler
174 174
         if ($container->getParameterBag()->resolveValue($documentManager['profiler']['enabled'])) {
175  
-            $dataCollectorId = sprintf('doctrine.odm.mongodb.data_collector.%s', $container->getParameterBag()->resolveValue($documentManager['profiler']['pretty']) ? 'pretty' : 'standard');
  175
+            $dataCollectorId = sprintf('doctrine_mongodb.odm.data_collector.%s', $container->getParameterBag()->resolveValue($documentManager['profiler']['pretty']) ? 'pretty' : 'standard');
176 176
             $loggers[] = new Reference($dataCollectorId);
177 177
             $container
178 178
                 ->getDefinition($dataCollectorId)
@@ -181,9 +181,9 @@ protected function loadDocumentManager(array $documentManager, $defaultDM, $defa
181 181
         }
182 182
 
183 183
         if (1 < count($loggers)) {
184  
-            $methods['setLoggerCallable'] = array(new Reference('doctrine.odm.mongodb.logger.aggregate'), 'logQuery');
  184
+            $methods['setLoggerCallable'] = array(new Reference('doctrine_mongodb.odm.logger.aggregate'), 'logQuery');
185 185
             $container
186  
-                ->getDefinition('doctrine.odm.mongodb.logger.aggregate')
  186
+                ->getDefinition('doctrine_mongodb.odm.logger.aggregate')
187 187
                 ->addArgument($loggers)
188 188
             ;
189 189
         } elseif ($loggers) {
@@ -198,25 +198,25 @@ protected function loadDocumentManager(array $documentManager, $defaultDM, $defa
198 198
         }
199 199
 
200 200
         $odmDmArgs = array(
201  
-            new Reference(sprintf('doctrine.odm.mongodb.%s_connection', $connectionName)),
202  
-            new Reference(sprintf('doctrine.odm.mongodb.%s_configuration', $documentManager['name'])),
  201
+            new Reference(sprintf('doctrine_mongodb.odm.%s_connection', $connectionName)),
  202
+            new Reference(sprintf('doctrine_mongodb.odm.%s_configuration', $documentManager['name'])),
203 203
             // Document managers will share their connection's event manager
204  
-            new Reference(sprintf('doctrine.odm.mongodb.%s_connection.event_manager', $connectionName)),
  204
+            new Reference(sprintf('doctrine_mongodb.odm.%s_connection.event_manager', $connectionName)),
205 205
         );
206  
-        $odmDmDef = new Definition('%doctrine.odm.mongodb.document_manager.class%', $odmDmArgs);
207  
-        $odmDmDef->setFactoryClass('%doctrine.odm.mongodb.document_manager.class%');
  206
+        $odmDmDef = new Definition('%doctrine_mongodb.odm.document_manager.class%', $odmDmArgs);
  207
+        $odmDmDef->setFactoryClass('%doctrine_mongodb.odm.document_manager.class%');
208 208
         $odmDmDef->setFactoryMethod('create');
209  
-        $odmDmDef->addTag('doctrine.odm.mongodb.document_manager');
210  
-        $container->setDefinition(sprintf('doctrine.odm.mongodb.%s_document_manager', $documentManager['name']), $odmDmDef);
  209
+        $odmDmDef->addTag('doctrine_mongodb.odm.document_manager');
  210
+        $container->setDefinition(sprintf('doctrine_mongodb.odm.%s_document_manager', $documentManager['name']), $odmDmDef);
211 211
 
212 212
         if ($documentManager['name'] == $defaultDM) {
213 213
             $container->setAlias(
214  
-                'doctrine.odm.mongodb.document_manager',
215  
-                new Alias(sprintf('doctrine.odm.mongodb.%s_document_manager', $documentManager['name']))
  214
+                'doctrine_mongodb.odm.document_manager',
  215
+                new Alias(sprintf('doctrine_mongodb.odm.%s_document_manager', $documentManager['name']))
216 216
             );
217 217
             $container->setAlias(
218  
-                'doctrine.odm.mongodb.event_manager',
219  
-                new Alias(sprintf('doctrine.odm.mongodb.%s_connection.event_manager', $connectionName))
  218
+                'doctrine_mongodb.odm.event_manager',
  219
+                new Alias(sprintf('doctrine_mongodb.odm.%s_connection.event_manager', $connectionName))
220 220
             );
221 221
         }
222 222
     }
@@ -232,21 +232,21 @@ protected function loadConnections(array $connections, ContainerBuilder $contain
232 232
         $cons = array();
233 233
         foreach ($connections as $name => $connection) {
234 234
             // Define an event manager for this connection
235  
-            $eventManagerId = sprintf('doctrine.odm.mongodb.%s_connection.event_manager', $name);
236  
-            $container->setDefinition($eventManagerId, new DefinitionDecorator('doctrine.odm.mongodb.connection.event_manager'));
  235
+            $eventManagerId = sprintf('doctrine_mongodb.odm.%s_connection.event_manager', $name);
  236
+            $container->setDefinition($eventManagerId, new DefinitionDecorator('doctrine_mongodb.odm.connection.event_manager'));
237 237
 
238 238
             $odmConnArgs = array(
239 239
                 isset($connection['server']) ? $connection['server'] : null,
240 240
                 isset($connection['options']) ? $connection['options'] : array(),
241  
-                new Reference(sprintf('doctrine.odm.mongodb.%s_configuration', $name)),
  241
+                new Reference(sprintf('doctrine_mongodb.odm.%s_configuration', $name)),
242 242
                 new Reference($eventManagerId),
243 243
             );
244  
-            $odmConnDef = new Definition('%doctrine.odm.mongodb.connection.class%', $odmConnArgs);
245  
-            $id = sprintf('doctrine.odm.mongodb.%s_connection', $name);
  244
+            $odmConnDef = new Definition('%doctrine_mongodb.odm.connection.class%', $odmConnArgs);
  245
+            $id = sprintf('doctrine_mongodb.odm.%s_connection', $name);
246 246
             $container->setDefinition($id, $odmConnDef);
247 247
             $cons[$name] = $id;
248 248
         }
249  
-        $container->setParameter('doctrine.odm.mongodb.connections', $cons);
  249
+        $container->setParameter('doctrine_mongodb.odm.connections', $cons);
250 250
     }
251 251
 
252 252
     /**
@@ -306,7 +306,7 @@ protected function loadDocumentManagerBundlesMappingInformation(array $documentM
306 306
 
307 307
     protected function getObjectManagerElementName($name)
308 308
     {
309  
-        return 'doctrine.odm.mongodb.' . $name;
  309
+        return 'doctrine_mongodb.odm.' . $name;
310 310
     }
311 311
 
312 312
     protected function getMappingObjectDefaultName()
12  DoctrineMongoDBBundle.php
@@ -38,13 +38,13 @@ class DoctrineMongoDBBundle extends Bundle
38 38
 
39 39
     public function build(ContainerBuilder $container)
40 40
     {
41  
-        $container->addCompilerPass(new RegisterEventListenersAndSubscribersPass('doctrine.odm.mongodb.connections', 'doctrine.odm.mongodb.%s_connection.event_manager', 'doctrine.odm.mongodb'), PassConfig::TYPE_BEFORE_OPTIMIZATION);
  41
+        $container->addCompilerPass(new RegisterEventListenersAndSubscribersPass('doctrine_mongodb.odm.connections', 'doctrine_mongodb.odm.%s_connection.event_manager', 'doctrine_mongodb.odm'), PassConfig::TYPE_BEFORE_OPTIMIZATION);
42 42
         $container->addCompilerPass(new CreateProxyDirectoryPass(), PassConfig::TYPE_BEFORE_REMOVING);
43 43
         $container->addCompilerPass(new CreateHydratorDirectoryPass(), PassConfig::TYPE_BEFORE_REMOVING);
44 44
         $container->addCompilerPass(new DoctrineValidationPass('mongodb'));
45 45
 
46 46
         if ($container->hasExtension('security')) {
47  
-            $container->getExtension('security')->addUserProviderFactory(new EntityFactory('mongodb', 'doctrine.odm.mongodb.security.user.provider'));
  47
+            $container->getExtension('security')->addUserProviderFactory(new EntityFactory('mongodb', 'doctrine_mongodb.odm.security.user.provider'));
48 48
         }
49 49
     }
50 50
 
@@ -57,9 +57,9 @@ public function boot()
57 57
     {
58 58
         // Register an autoloader for proxies to avoid issues when unserializing them
59 59
         // when the ODM is used.
60  
-        if ($this->container->hasParameter('doctrine.odm.mongodb.proxy_namespace')) {
61  
-            $namespace = $this->container->getParameter('doctrine.odm.mongodb.proxy_namespace');
62  
-            $dir = $this->container->getParameter('doctrine.odm.mongodb.proxy_dir');
  60
+        if ($this->container->hasParameter('doctrine_mongodb.odm.proxy_namespace')) {
  61
+            $namespace = $this->container->getParameter('doctrine_mongodb.odm.proxy_namespace');
  62
+            $dir = $this->container->getParameter('doctrine_mongodb.odm.proxy_dir');
63 63
             // See https://github.com/symfony/symfony/pull/3419 for usage of
64 64
             // references
65 65
             $container =& $this->container;
@@ -71,7 +71,7 @@ public function boot()
71 71
 
72 72
                     if (!is_file($file) && $container->getParameter('kernel.debug')) {
73 73
                         $originalClassName = ClassUtils::getRealClass($class);
74  
-                        $registry = $container->get('doctrine.odm.mongodb');
  74
+                        $registry = $container->get('doctrine_mongodb');
75 75
 
76 76
                         // Tries to auto-generate the proxy file
77 77
                         foreach ($registry->getManagers() as $dm) {
118  Resources/config/mongodb.xml
@@ -6,106 +6,106 @@
6 6
 
7 7
     <parameters>
8 8
         <!-- classes -->
9  
-        <parameter key="doctrine.odm.mongodb.connection.class">Doctrine\MongoDB\Connection</parameter>
10  
-        <parameter key="doctrine.odm.mongodb.configuration.class">Doctrine\ODM\MongoDB\Configuration</parameter>
11  
-        <parameter key="doctrine.odm.mongodb.document_manager.class">Doctrine\ODM\MongoDB\DocumentManager</parameter>
12  
-        <parameter key="doctrine.odm.mongodb.logger.class">Doctrine\Bundle\MongoDBBundle\Logger\Logger</parameter>
13  
-        <parameter key="doctrine.odm.mongodb.logger.aggregate.class">Doctrine\Bundle\MongoDBBundle\Logger\AggregateLogger</parameter>
14  
-        <parameter key="doctrine.odm.mongodb.data_collector.standard.class">Doctrine\Bundle\MongoDBBundle\DataCollector\StandardDataCollector</parameter>
15  
-        <parameter key="doctrine.odm.mongodb.data_collector.pretty.class">Doctrine\Bundle\MongoDBBundle\DataCollector\PrettyDataCollector</parameter>
16  
-        <parameter key="doctrine.odm.mongodb.event_manager.class">Symfony\Bridge\Doctrine\ContainerAwareEventManager</parameter>
  9
+        <parameter key="doctrine_mongodb.odm.connection.class">Doctrine\MongoDB\Connection</parameter>
  10
+        <parameter key="doctrine_mongodb.odm.configuration.class">Doctrine\ODM\MongoDB\Configuration</parameter>
  11
+        <parameter key="doctrine_mongodb.odm.document_manager.class">Doctrine\ODM\MongoDB\DocumentManager</parameter>
  12
+        <parameter key="doctrine_mongodb.odm.logger.class">Doctrine\Bundle\MongoDBBundle\Logger\Logger</parameter>
  13
+        <parameter key="doctrine_mongodb.odm.logger.aggregate.class">Doctrine\Bundle\MongoDBBundle\Logger\AggregateLogger</parameter>
  14
+        <parameter key="doctrine_mongodb.odm.data_collector.standard.class">Doctrine\Bundle\MongoDBBundle\DataCollector\StandardDataCollector</parameter>
  15
+        <parameter key="doctrine_mongodb.odm.data_collector.pretty.class">Doctrine\Bundle\MongoDBBundle\DataCollector\PrettyDataCollector</parameter>
  16
+        <parameter key="doctrine_mongodb.odm.event_manager.class">Symfony\Bridge\Doctrine\ContainerAwareEventManager</parameter>
17 17
         <parameter key="doctrine_odm.mongodb.validator_initializer.class">Symfony\Bridge\Doctrine\Validator\DoctrineInitializer</parameter>
18 18
         <parameter key="doctrine_odm.mongodb.validator.unique.class">Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator</parameter>
19  
-        <parameter key="doctrine.odm.mongodb.class">Doctrine\Bundle\MongoDBBundle\ManagerRegistry</parameter>
20  
-        <parameter key="doctrine.odm.mongodb.security.user.provider.class">Symfony\Bridge\Doctrine\Security\User\EntityUserProvider</parameter>
21  
-        <parameter key="doctrine.odm.mongodb.proxy_cache_warmer.class">Doctrine\Bundle\MongoDBBundle\CacheWarmer\ProxyCacheWarmer</parameter>
22  
-        <parameter key="doctrine.odm.mongodb.hydrator_cache_warmer.class">Doctrine\Bundle\MongoDBBundle\CacheWarmer\HydratorCacheWarmer</parameter>
  19
+        <parameter key="doctrine_mongodb.odm.class">Doctrine\Bundle\MongoDBBundle\ManagerRegistry</parameter>
  20
+        <parameter key="doctrine_mongodb.odm.security.user.provider.class">Symfony\Bridge\Doctrine\Security\User\EntityUserProvider</parameter>
  21
+        <parameter key="doctrine_mongodb.odm.proxy_cache_warmer.class">Doctrine\Bundle\MongoDBBundle\CacheWarmer\ProxyCacheWarmer</parameter>
  22
+        <parameter key="doctrine_mongodb.odm.hydrator_cache_warmer.class">Doctrine\Bundle\MongoDBBundle\CacheWarmer\HydratorCacheWarmer</parameter>
23 23
 
24 24
         <!-- cache -->
25  
-        <parameter key="doctrine.odm.mongodb.cache.array.class">Doctrine\Common\Cache\ArrayCache</parameter>
26  
-        <parameter key="doctrine.odm.mongodb.cache.apc.class">Doctrine\Common\Cache\ApcCache</parameter>
27  
-        <parameter key="doctrine.odm.mongodb.cache.memcache.class">Doctrine\Common\Cache\MemcacheCache</parameter>
28  
-        <parameter key="doctrine.odm.mongodb.cache.memcache_host">localhost</parameter>
29  
-        <parameter key="doctrine.odm.mongodb.cache.memcache_port">11211</parameter>
30  
-        <parameter key="doctrine.odm.mongodb.cache.memcache_instance.class">Memcache</parameter>
31  
-        <parameter key="doctrine.odm.mongodb.cache.xcache.class">Doctrine\Common\Cache\XcacheCache</parameter>
  25
+        <parameter key="doctrine_mongodb.odm.cache.array.class">Doctrine\Common\Cache\ArrayCache</parameter>
  26
+        <parameter key="doctrine_mongodb.odm.cache.apc.class">Doctrine\Common\Cache\ApcCache</parameter>
  27
+        <parameter key="doctrine_mongodb.odm.cache.memcache.class">Doctrine\Common\Cache\MemcacheCache</parameter>
  28
+        <parameter key="doctrine_mongodb.odm.cache.memcache_host">localhost</parameter>
  29
+        <parameter key="doctrine_mongodb.odm.cache.memcache_port">11211</parameter>
  30
+        <parameter key="doctrine_mongodb.odm.cache.memcache_instance.class">Memcache</parameter>
  31
+        <parameter key="doctrine_mongodb.odm.cache.xcache.class">Doctrine\Common\Cache\XcacheCache</parameter>
32 32
 
33 33
         <!-- metadata -->
34  
-        <parameter key="doctrine.odm.mongodb.metadata.driver_chain.class">Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain</parameter>
35  
-        <parameter key="doctrine.odm.mongodb.metadata.annotation.class">Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver</parameter>
36  
-        <parameter key="doctrine.odm.mongodb.metadata.xml.class">Doctrine\Bundle\MongoDBBundle\Mapping\Driver\XmlDriver</parameter>
37  
-        <parameter key="doctrine.odm.mongodb.metadata.yml.class">Doctrine\Bundle\MongoDBBundle\Mapping\Driver\YamlDriver</parameter>
  34
+        <parameter key="doctrine_mongodb.odm.metadata.driver_chain.class">Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain</parameter>
  35
+        <parameter key="doctrine_mongodb.odm.metadata.annotation.class">Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver</parameter>
  36
+        <parameter key="doctrine_mongodb.odm.metadata.xml.class">Doctrine\Bundle\MongoDBBundle\Mapping\Driver\XmlDriver</parameter>
  37
+        <parameter key="doctrine_mongodb.odm.metadata.yml.class">Doctrine\Bundle\MongoDBBundle\Mapping\Driver\YamlDriver</parameter>
38 38
 
39 39
         <!-- directories -->
40  
-        <parameter key="doctrine.odm.mongodb.mapping_dirs" type="collection"></parameter>
41  
-        <parameter key="doctrine.odm.mongodb.xml_mapping_dirs">%doctrine.odm.mongodb.mapping_dirs%</parameter>
42  
-        <parameter key="doctrine.odm.mongodb.yml_mapping_dirs">%doctrine.odm.mongodb.mapping_dirs%</parameter>
43  
-        <parameter key="doctrine.odm.mongodb.document_dirs" type="collection"></parameter>
  40
+        <parameter key="doctrine_mongodb.odm.mapping_dirs" type="collection"></parameter>
  41
+        <parameter key="doctrine_mongodb.odm.xml_mapping_dirs">%doctrine_mongodb.odm.mapping_dirs%</parameter>
  42
+        <parameter key="doctrine_mongodb.odm.yml_mapping_dirs">%doctrine_mongodb.odm.mapping_dirs%</parameter>
  43
+        <parameter key="doctrine_mongodb.odm.document_dirs" type="collection"></parameter>
44 44
 
45 45
         <!-- logger -->
46  
-        <parameter key="doctrine.odm.mongodb.logger.batch_insert_threshold">4</parameter>
  46
+        <parameter key="doctrine_mongodb.odm.logger.batch_insert_threshold">4</parameter>
47 47
     </parameters>
48 48
 
49 49
     <services>
50 50
         <!-- defaults -->
51  
-        <service id="doctrine.odm.mongodb.cache" alias="doctrine.odm.mongodb.cache.array" />
  51
+        <service id="doctrine_mongodb.odm.cache" alias="doctrine_mongodb.odm.cache.array" />
52 52
 
53 53
         <!-- events -->
54  
-        <service id="doctrine.odm.mongodb.connection.event_manager" class="%doctrine.odm.mongodb.event_manager.class%" public="false" abstract="true">
  54
+        <service id="doctrine_mongodb.odm.connection.event_manager" class="%doctrine_mongodb.odm.event_manager.class%" public="false" abstract="true">
55 55
             <argument type="service" id="service_container" />
56 56
         </service>
57 57
 
58 58
         <!-- form -->
59 59
         <service id="form.type.mongodb_document" class="Doctrine\Bundle\MongoDBBundle\Form\Type\DocumentType">
60 60
             <tag name="form.type" alias="document" />
61  
-            <argument type="service" id="doctrine.odm.mongodb" />
  61
+            <argument type="service" id="doctrine_mongodb.odm" />
62 62
         </service>
63 63
         <service id="form.type_guesser.doctrine.mongodb" class="Doctrine\Bundle\MongoDBBundle\Form\DoctrineMongoDBTypeGuesser">
64 64
             <tag name="form.type_guesser" />
65  
-            <argument type="service" id="doctrine.odm.mongodb" />
  65
+            <argument type="service" id="doctrine_mongodb.odm" />
66 66
         </service>
67 67
 
68 68
         <!-- metadata -->
69  
-        <service id="doctrine.odm.mongodb.metadata.chain" class="%doctrine.odm.mongodb.metadata.driver_chain.class%" />
70  
-        <service id="doctrine.odm.mongodb.metadata.annotation" class="%doctrine.odm.mongodb.metadata.annotation.class%">
71  
-            <argument type="service" id="doctrine.odm.mongodb.metadata.annotation_reader" />
72  
-            <argument>%doctrine.odm.mongodb.document_dirs%</argument>
  69
+        <service id="doctrine_mongodb.odm.metadata.chain" class="%doctrine_mongodb.odm.metadata.driver_chain.class%" />
  70
+        <service id="doctrine_mongodb.odm.metadata.annotation" class="%doctrine_mongodb.odm.metadata.annotation.class%">
  71
+            <argument type="service" id="doctrine_mongodb.odm.metadata.annotation_reader" />
  72
+            <argument>%doctrine_mongodb.odm.document_dirs%</argument>
73 73
         </service>
74  
-        <service id="doctrine.odm.mongodb.metadata.annotation_reader" alias="annotation_reader" />
75  
-        <service id="doctrine.odm.mongodb.metadata.xml" class="%doctrine.odm.mongodb.metadata.xml.class%">
76  
-            <argument>%doctrine.odm.mongodb.xml_mapping_dirs%</argument>
  74
+        <service id="doctrine_mongodb.odm.metadata.annotation_reader" alias="annotation_reader" />
  75
+        <service id="doctrine_mongodb.odm.metadata.xml" class="%doctrine_mongodb.odm.metadata.xml.class%">
  76
+            <argument>%doctrine_mongodb.odm.xml_mapping_dirs%</argument>
77 77
         </service>
78  
-        <service id="doctrine.odm.mongodb.metadata.yml" class="%doctrine.odm.mongodb.metadata.yml.class%">
79  
-            <argument>%doctrine.odm.mongodb.yml_mapping_dirs%</argument>
  78
+        <service id="doctrine_mongodb.odm.metadata.yml" class="%doctrine_mongodb.odm.metadata.yml.class%">
  79
+            <argument>%doctrine_mongodb.odm.yml_mapping_dirs%</argument>
80 80
         </service>
81 81
 
82 82
         <!-- cache -->
83  
-        <service id="doctrine.odm.mongodb.cache.array" class="%doctrine.odm.mongodb.cache.array.class%" />
  83
+        <service id="doctrine_mongodb.odm.cache.array" class="%doctrine_mongodb.odm.cache.array.class%" />
84 84
 
85 85
         <!-- logger -->
86  
-        <service id="doctrine.odm.mongodb.logger" class="%doctrine.odm.mongodb.logger.class%" public="false">
  86
+        <service id="doctrine_mongodb.odm.logger" class="%doctrine_mongodb.odm.logger.class%" public="false">
87 87
             <tag name="monolog.logger" channel="doctrine" />
88 88
             <argument type="service" id="logger" on-invalid="null" />
89 89
             <call method="setBatchInsertThreshold">
90  
-                <argument>%doctrine.odm.mongodb.logger.batch_insert_threshold%</argument>
  90
+                <argument>%doctrine_mongodb.odm.logger.batch_insert_threshold%</argument>
91 91
             </call>
92 92
         </service>
93  
-        <service id="doctrine.odm.mongodb.logger.aggregate" class="%doctrine.odm.mongodb.logger.aggregate.class%" public="false" />
  93
+        <service id="doctrine_mongodb.odm.logger.aggregate" class="%doctrine_mongodb.odm.logger.aggregate.class%" public="false" />
94 94
 
95 95
         <!-- profiler -->
96  
-        <service id="doctrine.odm.mongodb.data_collector.standard" class="%doctrine.odm.mongodb.data_collector.standard.class%" public="false" />
97  
-        <service id="doctrine.odm.mongodb.data_collector.pretty" class="%doctrine.odm.mongodb.data_collector.pretty.class%" public="false">
  96
+        <service id="doctrine_mongodb.odm.data_collector.standard" class="%doctrine_mongodb.odm.data_collector.standard.class%" public="false" />
  97
+        <service id="doctrine_mongodb.odm.data_collector.pretty" class="%doctrine_mongodb.odm.data_collector.pretty.class%" public="false">
98 98
             <call method="setBatchInsertThreshold">
99  
-                <argument>%doctrine.odm.mongodb.logger.batch_insert_threshold%</argument>
  99
+                <argument>%doctrine_mongodb.odm.logger.batch_insert_threshold%</argument>
100 100
             </call>
101 101
         </service>
102 102
 
103 103
         <!-- Cache Warmers -->
104  
-        <service id="doctrine.odm.mongodb.proxy_cache_warmer" class="%doctrine.odm.mongodb.proxy_cache_warmer.class%" public="false">
  104
+        <service id="doctrine_mongodb.odm.proxy_cache_warmer" class="%doctrine_mongodb.odm.proxy_cache_warmer.class%" public="false">
105 105
             <tag name="kernel.cache_warmer" priority="25" />
106 106
             <argument type="service" id="service_container" />
107 107
         </service>
108  
-        <service id="doctrine.odm.mongodb.hydrator_cache_warmer" class="%doctrine.odm.mongodb.hydrator_cache_warmer.class%" public="false">
  108
+        <service id="doctrine_mongodb.odm.hydrator_cache_warmer" class="%doctrine_mongodb.odm.hydrator_cache_warmer.class%" public="false">
109 109
             <tag name="kernel.cache_warmer" priority="25" />
110 110
             <argument type="service" id="service_container" />
111 111
         </service>
@@ -113,26 +113,26 @@
113 113
         <!--  validator -->
114 114
         <service id="doctrine_odm.mongodb.validator.unique" class="%doctrine_odm.mongodb.validator.unique.class%">
115 115
             <tag name="validator.constraint_validator" alias="doctrine_odm.mongodb.unique" />
116  
-            <argument type="service" id="doctrine.odm.mongodb" />
  116
+            <argument type="service" id="doctrine_mongodb.odm" />
117 117
         </service>
118 118
 
119 119
         <service id="doctrine_odm.mongodb.validator_initializer" class="%doctrine_odm.mongodb.validator_initializer.class%">
120 120
             <tag name="validator.initializer" />
121  
-            <argument type="service" id="doctrine.odm.mongodb" />
  121
+            <argument type="service" id="doctrine_mongodb.odm" />
122 122
         </service>
123 123
 
124 124
         <!-- Security -->
125  
-        <service id="doctrine.odm.mongodb.security.user.provider" class="%doctrine.odm.mongodb.security.user.provider.class%" public="false" abstract="true">
126  
-            <argument type="service" id="doctrine.odm.mongodb" />
  125
+        <service id="doctrine_mongodb.odm.security.user.provider" class="%doctrine_mongodb.odm.security.user.provider.class%" public="false" abstract="true">
  126
+            <argument type="service" id="doctrine_mongodb.odm" />
127 127
         </service>
128 128
 
129 129
         <!-- Registry -->
130  
-        <service id="doctrine.odm.mongodb" class="%doctrine.odm.mongodb.class%">
  130
+        <service id="doctrine_mongodb" class="%doctrine_mongodb.odm.class%">
131 131
             <argument>MongoDB</argument>
132  
-            <argument>%doctrine.odm.mongodb.connections%</argument>
133  
-            <argument>%doctrine.odm.mongodb.document_managers%</argument>
134  
-            <argument>%doctrine.odm.mongodb.default_connection%</argument>
135  
-            <argument>%doctrine.odm.mongodb.default_document_manager%</argument>
  132
+            <argument>%doctrine_mongodb.odm.connections%</argument>
  133
+            <argument>%doctrine_mongodb.odm.document_managers%</argument>
  134
+            <argument>%doctrine_mongodb.odm.default_connection%</argument>
  135
+            <argument>%doctrine_mongodb.odm.default_document_manager%</argument>
136 136
             <argument>Doctrine\ODM\MongoDB\Proxy\Proxy</argument>
137 137
             <call method="setContainer">
138 138
                 <argument type="service" id="service_container" />
8  Resources/doc/config.rst
Source Rendered
@@ -213,14 +213,14 @@ following syntax:
213 213
 
214 214
 Now you can retrieve the configured services connection services::
215 215
 
216  
-    $conn1 = $container->get('doctrine.odm.mongodb.conn1_connection');
217  
-    $conn2 = $container->get('doctrine.odm.mongodb.conn2_connection');
  216
+    $conn1 = $container->get('doctrine_mongodb.odm.conn1_connection');
  217
+    $conn2 = $container->get('doctrine_mongodb.odm.conn2_connection');
218 218
 
219 219
 And you can also retrieve the configured document manager services which utilize the above
220 220
 connection services::
221 221
 
222  
-    $dm1 = $container->get('doctrine.odm.mongodb.dm1_document_manager');
223  
-    $dm2 = $container->get('doctrine.odm.mongodb.dm2_document_manager');
  222
+    $dm1 = $container->get('doctrine_mongodb.odm.dm1_document_manager');
  223
+    $dm2 = $container->get('doctrine_mongodb.odm.dm2_document_manager');
224 224
 
225 225
 Connecting to a pool of mongodb servers on 1 connection
226 226
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2  Resources/doc/form.rst
Source Rendered
@@ -245,7 +245,7 @@ the validation and saves the data into MongoDB::
245 245
 
246 246
     public function createAction()
247 247
     {
248  
-        $dm = $this->get('doctrine.odm.mongodb.default_document_manager');
  248
+        $dm = $this->get('doctrine_mongodb')->getManager();
249 249
 
250 250
         $form = $this->createForm(new RegistrationType(), new Registration());
251 251
 
25  Resources/doc/index.rst
Source Rendered
@@ -279,7 +279,7 @@ of the bundle:
279 279
         $product->setName('A Foo Bar');
280 280
         $product->setPrice('19.99');
281 281
 
282  
-        $dm = $this->get('doctrine.odm.mongodb.document_manager');
  282
+        $dm = $this->get('doctrine_mongodb')->getManager();
283 283
         $dm->persist($product);
284 284
         $dm->flush();
285 285
 
@@ -333,7 +333,7 @@ you've configured a route to display a specific ``Product`` based on its
333 333
 
334 334
     public function showAction($id)
335 335
     {
336  
-        $product = $this->get('doctrine.odm.mongodb.document_manager')
  336
+        $product = $this->get('doctrine_mongodb')
337 337
             ->getRepository('AcmeStoreBundle:Product')
338 338
             ->find($id);
339 339
 
@@ -349,7 +349,8 @@ as its "repository". You can think of a repository as a PHP class whose only
349 349
 job is to help you fetch objects of a certain class. You can access the
350 350
 repository object for a document class via::
351 351
 
352  
-    $repository = $this->get('doctrine.odm.mongodb.document_manager')
  352
+    $repository = $this->get('doctrine_mongodb')
  353
+        ->getManager()
353 354
         ->getRepository('AcmeStoreBundle:Product');
354 355
 
355 356
 .. note::
@@ -399,7 +400,7 @@ you have a route that maps a product id to an update action in a controller::
399 400
 
400 401
     public function updateAction($id)
401 402
     {
402  
-        $dm = $this->get('doctrine.odm.mongodb.document_manager');
  403
+        $dm = $this->get('doctrine_mongodb')->getManager();
403 404
         $product = $dm->getRepository('AcmeStoreBundle:Product')->find($id);
404 405
 
405 406
         if (!$product) {
@@ -452,7 +453,8 @@ a query for exactly which documents you want to return. If you use an IDE,
452 453
 you can also take advantage of auto-completion as you type the method names.
453 454
 From inside a controller::
454 455
 
455  
-    $products = $this->get('doctrine.odm.mongodb.document_manager')
  456
+    $products = $this->get('doctrine_mongodb')
  457
+        ->getManager()
456 458
         ->createQueryBuilder('AcmeStoreBundle:Product')
457 459
         ->field('name')->equals('foo')
458 460
         ->limit(10)
@@ -548,7 +550,8 @@ ordered alphabetically.
548 550
 
549 551
 You can use this new method just like the default finder methods of the repository::
550 552
 
551  
-    $products = $this->get('doctrine.odm.mongodb.document_manager')
  553
+    $products = $this->get('doctrine_mongodb')
  554
+        ->getManager()
552 555
         ->getRepository('AcmeStoreBundle:Product')
553 556
         ->findAllOrderedByName();
554 557
 
@@ -650,7 +653,7 @@ see Doctrine's `Event Documentation`_.
650 653
 In Symfony, you can register a listener or subscriber by creating a :term:`service`
651 654
 and then :ref:`tagging<book-service-container-tags>` it with a specific tag.
652 655
 
653  
-*   **event listener**: Use the ``doctrine.odm.mongodb.event_listener`` tag to
  656
+*   **event listener**: Use the ``doctrine_mongodb.odm.event_listener`` tag to
654 657
     register a listener. The ``event`` attribute is required and should denote
655 658
     the event on which to listen. By default, listeners will be registered with
656 659
     event managers for all connections. To restrict a listener to a single
@@ -675,25 +678,25 @@ and then :ref:`tagging<book-service-container-tags>` it with a specific tag.
675 678
                     class:   Acme\HelloBundle\Listener\MyDoctrineListener
676 679
                     # ...
677 680
                     tags:
678  
-                        -  { name: doctrine.odm.mongodb.event_listener, event: postPersist }
  681
+                        -  { name: doctrine_mongodb.odm.event_listener, event: postPersist }
679 682
 
680 683
         .. code-block:: xml
681 684
 
682 685
             <service id="my_doctrine_listener" class="Acme\HelloBundle\Listener\MyDoctrineListener">
683 686
                 <!-- ... -->
684  
-                <tag name="doctrine.odm.mongodb.event_listener" event="postPersist" />
  687
+                <tag name="doctrine_mongodb.odm.event_listener" event="postPersist" />
685 688
             </service>.
686 689
 
687 690
         .. code-block:: php
688 691
 
689 692
             $definition = new Definition('Acme\HelloBundle\Listener\MyDoctrineListener');
690 693
             // ...
691  
-            $definition->addTag('doctrine.odm.mongodb.event_listener', array(
  694
+            $definition->addTag('doctrine_mongodb.odm.event_listener', array(
692 695
                 'event' => 'postPersist',
693 696
             ));
694 697
             $container->setDefinition('my_doctrine_listener', $definition);
695 698
 
696  
-*   **event subscriber**: Use the ``doctrine.odm.mongodb.event_subscriber`` tag
  699
+*   **event subscriber**: Use the ``doctrine_mongodb.odm.event_subscriber`` tag
697 700
     to register a subscriber. Subscribers are responsible for implementing
698 701
     ``Doctrine\Common\EventSubscriber`` and a method for returning the events
699 702
     they will observe. For this reason, this tag has no ``event`` attribute;
16  Tests/CacheWarmer/HydratorCacheWarmerTest.php
@@ -35,28 +35,28 @@ public function testWarmCache()
35 35
 
36 36
         $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
37 37
 
38  
-        $registry = new ManagerRegistry('MongoDB', array(), array('default' => 'doctrine.odm.mongodb.default_document_manager', 'foo' => 'doctrine.odm.mongodb.foo_document_manager'), 'default', 'default', 'Doctrine\ODM\MongoDB\Proxy\Proxy');
  38
+        $registry = new ManagerRegistry('MongoDB', array(), array('default' => 'doctrine_mongodb.odm.default_document_manager', 'foo' => 'doctrine_mongodb.odm.foo_document_manager'), 'default', 'default', 'Doctrine\ODM\MongoDB\Proxy\Proxy');
39 39
         $registry->setContainer($container);
40 40
 
41 41
         $container->expects($this->at(0))
42 42
                   ->method('getParameter')
43  
-                  ->with($this->equalTo('doctrine.odm.mongodb.hydrator_dir'))
  43
+                  ->with($this->equalTo('doctrine_mongodb.odm.hydrator_dir'))
44 44
                   ->will($this->returnValue(sys_get_temp_dir()));
45 45
         $container->expects($this->at(1))
46 46
                   ->method('getParameter')
47  
-                  ->with($this->equalTo('doctrine.odm.mongodb.auto_generate_hydrator_classes'))
  47
+                  ->with($this->equalTo('doctrine_mongodb.odm.auto_generate_hydrator_classes'))
48 48
                   ->will($this->returnValue(false));
49 49
         $container->expects($this->at(2))
50 50
                   ->method('get')
51  
-                  ->with($this->equalTo('doctrine.odm.mongodb'))
  51
+                  ->with($this->equalTo('doctrine_mongodb.odm'))
52 52
                   ->will($this->returnValue($registry));
53 53
         $container->expects($this->at(3))
54 54
                   ->method('get')
55  
-                  ->with($this->equalTo('doctrine.odm.mongodb.default_document_manager'))
  55
+                  ->with($this->equalTo('doctrine_mongodb.odm.default_document_manager'))
56 56
                   ->will($this->returnValue($testManager));
57 57
         $container->expects($this->at(4))
58 58
                   ->method('get')
59  
-                  ->with($this->equalTo('doctrine.odm.mongodb.foo_document_manager'))
  59
+                  ->with($this->equalTo('doctrine_mongodb.odm.foo_document_manager'))
60 60
                   ->will($this->returnValue($testManager));
61 61
 
62 62
         $cacheWarmer = new HydratorCacheWarmer($container);
@@ -75,11 +75,11 @@ public function testSkipWhenHydratorsAreAutoGenerated()
75 75
         $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
76 76
         $container->expects($this->at(0))
77 77
                   ->method('getParameter')
78  
-                  ->with($this->equalTo('doctrine.odm.mongodb.hydrator_dir'))
  78
+                  ->with($this->equalTo('doctrine_mongodb.odm.hydrator_dir'))
79 79
                   ->will($this->returnValue(sys_get_temp_dir()));
80 80
         $container->expects($this->at(1))
81 81
                   ->method('getParameter')
82  
-                  ->with($this->equalTo('doctrine.odm.mongodb.auto_generate_hydrator_classes'))
  82
+                  ->with($this->equalTo('doctrine_mongodb.odm.auto_generate_hydrator_classes'))
83 83
                   ->will($this->returnValue(true));
84 84
         $container->expects($this->at(2))
85 85
                   ->method('getParameter')
16  Tests/CacheWarmer/ProxyCacheWarmerTest.php
@@ -35,28 +35,28 @@ public function testWarmCache()
35 35
 
36 36
         $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
37 37
 
38  
-        $registry = new ManagerRegistry('MongodB', array(), array('default' => 'doctrine.odm.mongodb.default_document_manager', 'foo' => 'doctrine.odm.mongodb.foo_document_manager'), 'default', 'default', 'Doctrine\ODM\MongoDB\Proxy\Proxy');
  38
+        $registry = new ManagerRegistry('MongodB', array(), array('default' => 'doctrine_mongodb.odm.default_document_manager', 'foo' => 'doctrine_mongodb.odm.foo_document_manager'), 'default', 'default', 'Doctrine\ODM\MongoDB\Proxy\Proxy');
39 39
         $registry->setContainer($container);
40 40
 
41 41
         $container->expects($this->at(0))
42 42
                   ->method('getParameter')
43  
-                  ->with($this->equalTo('doctrine.odm.mongodb.proxy_dir'))
  43
+                  ->with($this->equalTo('doctrine_mongodb.odm.proxy_dir'))
44 44
                   ->will($this->returnValue(sys_get_temp_dir()));
45 45
         $container->expects($this->at(1))
46 46
                   ->method('getParameter')
47  
-                  ->with($this->equalTo('doctrine.odm.mongodb.auto_generate_proxy_classes'))
  47
+                  ->with($this->equalTo('doctrine_mongodb.odm.auto_generate_proxy_classes'))
48 48
                   ->will($this->returnValue(false));
49 49
         $container->expects($this->at(2))
50 50
                   ->method('get')
51  
-                  ->with($this->equalTo('doctrine.odm.mongodb'))
  51
+                  ->with($this->equalTo('doctrine_mongodb.odm'))
52 52
                   ->will($this->returnValue($registry));
53 53
         $container->expects($this->at(3))
54 54
                   ->method('get')
55  
-                  ->with($this->equalTo('doctrine.odm.mongodb.default_document_manager'))
  55
+                  ->with($this->equalTo('doctrine_mongodb.odm.default_document_manager'))
56 56
                   ->will($this->returnValue($testManager));
57 57
         $container->expects($this->at(4))
58 58
                   ->method('get')
59  
-                  ->with($this->equalTo('doctrine.odm.mongodb.foo_document_manager'))
  59
+                  ->with($this->equalTo('doctrine_mongodb.odm.foo_document_manager'))
60 60
                   ->will($this->returnValue($testManager));
61 61
 
62 62
         $cacheWarmer = new ProxyCacheWarmer($container);
@@ -75,11 +75,11 @@ public function testSkipWhenProxiesAreAutoGenerated()
75 75
         $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
76 76
         $container->expects($this->at(0))
77 77
                   ->method('getParameter')
78  
-                  ->with($this->equalTo('doctrine.odm.mongodb.proxy_dir'))
  78
+                  ->with($this->equalTo('doctrine_mongodb.odm.proxy_dir'))
79 79
                   ->will($this->returnValue(sys_get_temp_dir()));
80 80
         $container->expects($this->at(1))
81 81
                   ->method('getParameter')
82  
-                  ->with($this->equalTo('doctrine.odm.mongodb.auto_generate_proxy_classes'))
  82
+                  ->with($this->equalTo('doctrine_mongodb.odm.auto_generate_proxy_classes'))
83 83
                   ->will($this->returnValue(true));
84 84
         $container->expects($this->at(2))
85 85
                   ->method('getParameter')
10  Tests/ContainerTest.php
@@ -46,7 +46,7 @@ public function testLoggerConfig($config, $logger, $debug)
46 46
         $this->container->setParameter('kernel.debug', $debug);
47 47
         $this->extension->load(array($config), $this->container);
48 48
 
49  
-        $def = $this->container->getDefinition('doctrine.odm.mongodb.default_configuration');
  49
+        $def = $this->container->getDefinition('doctrine_mongodb.odm.default_configuration');
50 50
         if (false === $logger) {
51 51
             $this->assertFalse($def->hasMethodCall('setLoggerCallable'));
52 52
         } else {
@@ -69,7 +69,7 @@ public function provideLoggerConfigs()
69 69
             array(
70 70
                 // logging and profiler default to true when in debug mode
71 71
                 array('document_managers' => array('default' => array())) + $config,
72  
-                'doctrine.odm.mongodb.logger.aggregate',
  72
+                'doctrine_mongodb.odm.logger.aggregate',
73 73
                 true,
74 74
             ),
75 75
             array(
@@ -80,17 +80,17 @@ public function provideLoggerConfigs()
80 80
             ),
81 81
             array(
82 82
                 array('document_managers' => array('default' => array('logging' => true, 'profiler' => true))) + $config,
83  
-                'doctrine.odm.mongodb.logger.aggregate',
  83
+                'doctrine_mongodb.odm.logger.aggregate',
84 84
                 true,
85 85
             ),
86 86
             array(
87 87
                 array('document_managers' => array('default' => array('logging' => false, 'profiler' => true))) + $config,
88  
-                'doctrine.odm.mongodb.data_collector.pretty',
  88
+                'doctrine_mongodb.odm.data_collector.pretty',
89 89
                 true,
90 90
             ),
91 91
             array(
92 92
                 array('document_managers' => array('default' => array('logging' => true, 'profiler' => false))) + $config,
93  
-                'doctrine.odm.mongodb.logger',
  93
+                'doctrine_mongodb.odm.logger',
94 94
                 true,
95 95
             ),
96 96
             array(
200  Tests/DependencyInjection/AbstractMongoDBExtensionTest.php
@@ -31,22 +31,22 @@ public function testDependencyInjectionConfigurationDefaults()
31 31
 
32 32
         $loader->load(array(array()), $container);
33 33
 
34  
-        $this->assertEquals('Doctrine\MongoDB\Connection', $container->getParameter('doctrine.odm.mongodb.connection.class'));
35  
-        $this->assertEquals('Doctrine\ODM\MongoDB\Configuration', $container->getParameter('doctrine.odm.mongodb.configuration.class'));
36  
-        $this->assertEquals('Doctrine\ODM\MongoDB\DocumentManager', $container->getParameter('doctrine.odm.mongodb.document_manager.class'));
37  
-        $this->assertEquals('MongoDBODMProxies', $container->getParameter('doctrine.odm.mongodb.proxy_namespace'));
38  
-        $this->assertEquals(false, $container->getParameter('doctrine.odm.mongodb.auto_generate_proxy_classes'));
39  
-        $this->assertEquals('Doctrine\Common\Cache\ArrayCache', $container->getParameter('doctrine.odm.mongodb.cache.array.class'));
40  
-        $this->assertEquals('Doctrine\Common\Cache\ApcCache', $container->getParameter('doctrine.odm.mongodb.cache.apc.class'));
41  
-        $this->assertEquals('Doctrine\Common\Cache\MemcacheCache', $container->getParameter('doctrine.odm.mongodb.cache.memcache.class'));
42  
-        $this->assertEquals('localhost', $container->getParameter('doctrine.odm.mongodb.cache.memcache_host'));
43  
-        $this->assertEquals('11211', $container->getParameter('doctrine.odm.mongodb.cache.memcache_port'));
44  
-        $this->assertEquals('Memcache', $container->getParameter('doctrine.odm.mongodb.cache.memcache_instance.class'));
45  
-        $this->assertEquals('Doctrine\Common\Cache\XcacheCache', $container->getParameter('doctrine.odm.mongodb.cache.xcache.class'));
46  
-        $this->assertEquals('Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain', $container->getParameter('doctrine.odm.mongodb.metadata.driver_chain.class'));
47  
-        $this->assertEquals('Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver', $container->getParameter('doctrine.odm.mongodb.metadata.annotation.class'));
48  
-        $this->assertEquals('Doctrine\Bundle\MongoDBBundle\Mapping\Driver\XmlDriver', $container->getParameter('doctrine.odm.mongodb.metadata.xml.class'));
49  
-        $this->assertEquals('Doctrine\Bundle\MongoDBBundle\Mapping\Driver\YamlDriver', $container->getParameter('doctrine.odm.mongodb.metadata.yml.class'));
  34
+        $this->assertEquals('Doctrine\MongoDB\Connection', $container->getParameter('doctrine_mongodb.odm.connection.class'));
  35
+        $this->assertEquals('Doctrine\ODM\MongoDB\Configuration', $container->getParameter('doctrine_mongodb.odm.configuration.class'));
  36
+        $this->assertEquals('Doctrine\ODM\MongoDB\DocumentManager', $container->getParameter('doctrine_mongodb.odm.document_manager.class'));
  37
+        $this->assertEquals('MongoDBODMProxies', $container->getParameter('doctrine_mongodb.odm.proxy_namespace'));
  38
+        $this->assertEquals(false, $container->getParameter('doctrine_mongodb.odm.auto_generate_proxy_classes'));
  39
+        $this->assertEquals('Doctrine\Common\Cache\ArrayCache', $container->getParameter('doctrine_mongodb.odm.cache.array.class'));
  40
+        $this->assertEquals('Doctrine\Common\Cache\ApcCache', $container->getParameter('doctrine_mongodb.odm.cache.apc.class'));
  41
+        $this->assertEquals('Doctrine\Common\Cache\MemcacheCache', $container->getParameter('doctrine_mongodb.odm.cache.memcache.class'));
  42
+        $this->assertEquals('localhost', $container->getParameter('doctrine_mongodb.odm.cache.memcache_host'));
  43
+        $this->assertEquals('11211', $container->getParameter('doctrine_mongodb.odm.cache.memcache_port'));
  44
+        $this->assertEquals('Memcache', $container->getParameter('doctrine_mongodb.odm.cache.memcache_instance.class'));
  45
+        $this->assertEquals('Doctrine\Common\Cache\XcacheCache', $container->getParameter('doctrine_mongodb.odm.cache.xcache.class'));
  46
+        $this->assertEquals('Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain', $container->getParameter('doctrine_mongodb.odm.metadata.driver_chain.class'));
  47
+        $this->assertEquals('Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver', $container->getParameter('doctrine_mongodb.odm.metadata.annotation.class'));
  48
+        $this->assertEquals('Doctrine\Bundle\MongoDBBundle\Mapping\Driver\XmlDriver', $container->getParameter('doctrine_mongodb.odm.metadata.xml.class'));
  49
+        $this->assertEquals('Doctrine\Bundle\MongoDBBundle\Mapping\Driver\YamlDriver', $container->getParameter('doctrine_mongodb.odm.metadata.yml.class'));
50 50
 
51 51
         $this->assertEquals('Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator', $container->getParameter('doctrine_odm.mongodb.validator.unique.class'));
52 52
 
@@ -58,31 +58,31 @@ public function testDependencyInjectionConfigurationDefaults()
58 58
         );
59 59
         $loader->load(array($config), $container);
60 60
 
61  
-        $this->assertEquals('MyProxies', $container->getParameter('doctrine.odm.mongodb.proxy_namespace'));
62  
-        $this->assertEquals(true, $container->getParameter('doctrine.odm.mongodb.auto_generate_proxy_classes'));
  61
+        $this->assertEquals('MyProxies', $container->getParameter('doctrine_mongodb.odm.proxy_namespace'));
  62
+        $this->assertEquals(true, $container->getParameter('doctrine_mongodb.odm.auto_generate_proxy_classes'));
63 63
 
64  
-        $definition = $container->getDefinition('doctrine.odm.mongodb.default_connection');
65  
-        $this->assertEquals('%doctrine.odm.mongodb.connection.class%', $definition->getClass());
  64
+        $definition = $container->getDefinition('doctrine_mongodb.odm.default_connection');
  65
+        $this->assertEquals('%doctrine_mongodb.odm.connection.class%', $definition->getClass());
66 66
 
67 67
         $arguments = $definition->getArguments();
68 68
         $this->assertEquals(null, $arguments[0]);
69 69
         $this->assertEquals(array(), $arguments[1]);
70 70
         $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[2]);
71  
-        $this->assertEquals('doctrine.odm.mongodb.default_configuration', (string) $arguments[2]);
  71
+        $this->assertEquals('doctrine_mongodb.odm.default_configuration', (string) $arguments[2]);
72 72
         $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[3]);
73  
-        $this->assertEquals('doctrine.odm.mongodb.default_connection.event_manager', (string) $arguments[3]);
  73
+        $this->assertEquals('doctrine_mongodb.odm.default_connection.event_manager', (string) $arguments[3]);
74 74
 
75  
-        $definition = $container->getDefinition('doctrine.odm.mongodb.default_document_manager');
76  
-        $this->assertEquals('%doctrine.odm.mongodb.document_manager.class%', $definition->getClass());
77  
-        $this->assertEquals('%doctrine.odm.mongodb.document_manager.class%', $definition->getFactoryClass());
  75
+        $definition = $container->getDefinition('doctrine_mongodb.odm.default_document_manager');
  76
+        $this->assertEquals('%doctrine_mongodb.odm.document_manager.class%', $definition->getClass());
  77
+        $this->assertEquals('%doctrine_mongodb.odm.document_manager.class%', $definition->getFactoryClass());
78 78
         $this->assertEquals('create', $definition->getFactoryMethod());
79  
-        $this->assertArrayHasKey('doctrine.odm.mongodb.document_manager', $definition->getTags());
  79
+        $this->assertArrayHasKey('doctrine_mongodb.odm.document_manager', $definition->getTags());
80 80
 
81 81
         $arguments = $definition->getArguments();
82 82
         $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[0]);
83  
-        $this->assertEquals('doctrine.odm.mongodb.default_connection', (string) $arguments[0]);
  83
+        $this->assertEquals('doctrine_mongodb.odm.default_connection', (string) $arguments[0]);
84 84
         $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[1]);
85  
-        $this->assertEquals('doctrine.odm.mongodb.default_configuration', (string) $arguments[1]);
  85
+        $this->assertEquals('doctrine_mongodb.odm.default_configuration', (string) $arguments[1]);
86 86
     }
87 87
 
88 88
     public function testSingleDocumentManagerConfiguration()
@@ -101,28 +101,28 @@ public function testSingleDocumentManagerConfiguration()
101 101
         );
102 102
         $loader->load(array($config), $container);
103 103
 
104  
-        $definition = $container->getDefinition('doctrine.odm.mongodb.default_connection');
105  
-        $this->assertEquals('%doctrine.odm.mongodb.connection.class%', $definition->getClass());
  104
+        $definition = $container->getDefinition('doctrine_mongodb.odm.default_connection');
  105
+        $this->assertEquals('%doctrine_mongodb.odm.connection.class%', $definition->getClass());
106 106
 
107 107
         $arguments = $definition->getArguments();
108 108
         $this->assertEquals('mongodb://localhost:27017', $arguments[0]);
109 109
         $this->assertEquals(array('connect' => true), $arguments[1]);
110 110
         $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[2]);
111  
-        $this->assertEquals('doctrine.odm.mongodb.default_configuration', (string) $arguments[2]);
  111
+        $this->assertEquals('doctrine_mongodb.odm.default_configuration', (string) $arguments[2]);
112 112
         $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[3]);
113  
-        $this->assertEquals('doctrine.odm.mongodb.default_connection.event_manager', (string) $arguments[3]);
  113
+        $this->assertEquals('doctrine_mongodb.odm.default_connection.event_manager', (string) $arguments[3]);
114 114
 
115  
-        $definition = $container->getDefinition('doctrine.odm.mongodb.default_document_manager');
116  
-        $this->assertEquals('%doctrine.odm.mongodb.document_manager.class%', $definition->getClass());
117  
-        $this->assertEquals('%doctrine.odm.mongodb.document_manager.class%', $definition->getFactoryClass());
  115
+        $definition = $container->getDefinition('doctrine_mongodb.odm.default_document_manager');
  116
+        $this->assertEquals('%doctrine_mongodb.odm.document_manager.class%', $definition->getClass());
  117
+        $this->assertEquals('%doctrine_mongodb.odm.document_manager.class%', $definition->getFactoryClass());
118 118
         $this->assertEquals('create', $definition->getFactoryMethod());
119  
-        $this->assertArrayHasKey('doctrine.odm.mongodb.document_manager', $definition->getTags());
  119
+        $this->assertArrayHasKey('doctrine_mongodb.odm.document_manager', $definition->getTags());
120 120
 
121 121
         $arguments = $definition->getArguments();
122 122
         $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[0]);
123  
-        $this->assertEquals('doctrine.odm.mongodb.default_connection', (string) $arguments[0]);
  123
+        $this->assertEquals('doctrine_mongodb.odm.default_connection', (string) $arguments[0]);
124 124
         $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[1]);
125  
-        $this->assertEquals('doctrine.odm.mongodb.default_configuration', (string) $arguments[1]);
  125
+        $this->assertEquals('doctrine_mongodb.odm.default_configuration', (string) $arguments[1]);
126 126
     }
127 127
 
128 128
     public function testLoadSimpleSingleConnection()
@@ -137,37 +137,37 @@ public function testLoadSimpleSingleConnection()
137 137
         $container->getCompilerPassConfig()->setRemovingPasses(array());
138 138
         $container->compile();
139 139
 
140  
-        $definition = $container->getDefinition('doctrine.odm.mongodb.default_connection');
141  
-        $this->assertEquals('%doctrine.odm.mongodb.connection.class%', $definition->getClass());
  140
+        $definition = $container->getDefinition('doctrine_mongodb.odm.default_connection');
  141
+        $this->assertEquals('%doctrine_mongodb.odm.connection.class%', $definition->getClass());
142 142
 
143 143
         $arguments = $definition->getArguments();
144 144
         $this->assertEquals('mongodb://localhost:27017', $arguments[0]);
145 145
         $this->assertEquals(array('connect' => true), $arguments[1]);
146 146
         $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[2]);
147  
-        $this->assertEquals('doctrine.odm.mongodb.default_configuration', (string) $arguments[2]);
  147
+        $this->assertEquals('doctrine_mongodb.odm.default_configuration', (string) $arguments[2]);
148 148
         $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[3]);
149  
-        $this->assertEquals('doctrine.odm.mongodb.default_connection.event_manager', (string) $arguments[3]);
  149
+        $this->assertEquals('doctrine_mongodb.odm.default_connection.event_manager', (string) $arguments[3]);
150 150
 
151  
-        $definition = $container->getDefinition('doctrine.odm.mongodb.default_configuration');
  151
+        $definition = $container->getDefinition('doctrine_mongodb.odm.default_configuration');
152 152
         $methodCalls = $definition->getMethodCalls();
153 153
         $methodNames = array_map(function($call) { return $call[0]; }, $methodCalls);
154 154
         $this->assertInternalType('integer', $pos = array_search('setDefaultDB', $methodNames));
155 155
         $this->assertEquals('mydb', $methodCalls[$pos][1][0]);