Skip to content

Commit 8626ca8

Browse files
committed
Clean supported metadata driver types
1 parent e11ebf3 commit 8626ca8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/DependencyInjection/DoctrineMongoDBExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ protected function getMappingDriverBundleConfigDefaults(
235235
}
236236

237237
if (! $bundleConfig['dir']) {
238-
if (in_array($bundleConfig['type'], ['staticphp', 'attribute'])) {
238+
if (in_array($bundleConfig['type'], ['attribute'])) {
239239
$bundleConfig['dir'] = $bundleClassDir . '/' . $this->getMappingObjectDefaultName();
240240
} else {
241241
$bundleConfig['dir'] = $bundleDir . '/' . $this->getMappingResourceConfigDirectory($bundleDir);
@@ -325,8 +325,8 @@ protected function assertValidMappingConfiguration(
325325
throw new InvalidArgumentException(sprintf('Specified non-existing directory "%s" as Doctrine mapping source.', $mappingConfig['dir']));
326326
}
327327

328-
if (! in_array($mappingConfig['type'], ['xml', 'php', 'staticphp', 'attribute'])) {
329-
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')));
328+
if (! in_array($mappingConfig['type'], ['xml', 'attribute'])) {
329+
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')));
330330
}
331331
}
332332

0 commit comments

Comments
 (0)