diff --git a/src/DependencyInjection/DoctrineMongoDBExtension.php b/src/DependencyInjection/DoctrineMongoDBExtension.php index c4b0a451..78a3aec7 100644 --- a/src/DependencyInjection/DoctrineMongoDBExtension.php +++ b/src/DependencyInjection/DoctrineMongoDBExtension.php @@ -235,7 +235,7 @@ protected function getMappingDriverBundleConfigDefaults( } if (! $bundleConfig['dir']) { - if (in_array($bundleConfig['type'], ['staticphp', 'attribute'])) { + if (in_array($bundleConfig['type'], ['attribute'])) { $bundleConfig['dir'] = $bundleClassDir . '/' . $this->getMappingObjectDefaultName(); } else { $bundleConfig['dir'] = $bundleDir . '/' . $this->getMappingResourceConfigDirectory($bundleDir); @@ -279,10 +279,6 @@ protected function registerMappingDrivers(array $objectManager, ContainerBuilder } $mappingDriverDef->setArguments($args); - } elseif ($driverType === 'attribute') { - $mappingDriverDef = new Definition($this->getMetadataDriverClass($driverType), [ - array_values($driverPaths), - ]); } else { $mappingDriverDef = new Definition($this->getMetadataDriverClass($driverType), [ array_values($driverPaths), @@ -325,8 +321,8 @@ protected function assertValidMappingConfiguration( throw new InvalidArgumentException(sprintf('Specified non-existing directory "%s" as Doctrine mapping source.', $mappingConfig['dir'])); } - if (! in_array($mappingConfig['type'], ['xml', 'php', 'staticphp', 'attribute'])) { - throw new InvalidArgumentException(sprintf('Can only configure "xml", "yml", "php", "staticphp" or "attribute" through the DoctrineBundle. Use your own bundle to configure other metadata drivers. You can register them by adding a new driver to the "%s" service definition.', $this->getObjectManagerElementName($objectManagerName . '_metadata_driver'))); + if (! in_array($mappingConfig['type'], ['xml', 'attribute'])) { + throw new InvalidArgumentException(sprintf('Can only configure "xml" or "attribute" through the DoctrineMongoDBBundle. Use your own bundle to configure other metadata drivers. You can register them by adding a new driver to the "%s" service definition.', $this->getObjectManagerElementName($objectManagerName . '_metadata_driver'))); } }