Skip to content

Commit 1590836

Browse files
committed
Explicit namespaces for annotation entity mappings
1 parent cdbc9ec commit 1590836

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Diff for: src/Rixxi/Gedmo/DI/OrmExtension.php

+5-6
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,17 @@ public function getEntityMappings()
4444
$config = $this->getValidatedConfig();
4545

4646
$annotations = array(
47-
'loggable',
48-
'translatable',
49-
'treeable',
47+
'loggable' => 'Loggable',
48+
'translatable' => 'Translatable',
49+
'treeable' => 'Treeable',
5050
);
5151

5252
$path = realpath(__DIR__ . '/../../../../../../gedmo/doctrine-extensions/lib/Gedmo');
5353

5454
$mappings = array();
55-
foreach ($annotations as $annotation) {
55+
foreach ($annotations as $annotation => $namespace) {
5656
if ($config['all'] || $config[$annotation]) {
57-
$name = ucfirst($annotation);
58-
$mappings["Gedmo\\$name\\Entity"] = "$path/$name/Entity";
57+
$mappings["Gedmo\\$namespace\\Entity"] = "$path/$namespace/Entity";
5958
}
6059
}
6160

0 commit comments

Comments
 (0)