Skip to content

Commit bab5072

Browse files
committed
Merge branch 'annotation-driver-fix' into 3.0
* annotation-driver-fix: Fix annotation driver mapping pass to correctly instantiate and pass the annotation driver.
2 parents 3a7419f + a5d2af8 commit bab5072

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

DependencyInjection/Compiler/DoctrineMongoDBMappingsPass.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ public static function createPhpMappingDriver(array $mappings, array $managerPar
128128
*/
129129
public static function createAnnotationMappingDriver(array $namespaces, array $directories, array $managerParameters, $enabledParameter = false, array $aliasMap = array())
130130
{
131-
$arguments = array(new Reference('doctrine_mongodb.odm.metadata.annotation_reader'), $directories);
132-
$locator = new Definition('Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator', $arguments);
133-
$driver = new Definition('Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver', array($locator));
131+
$driver = new Definition('Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver', array(new Reference('annotation_reader'), $directories));
134132

135133
return new DoctrineMongoDBMappingsPass($driver, $namespaces, $managerParameters, $enabledParameter, $aliasMap);
136134
}

0 commit comments

Comments
 (0)