Skip to content

Commit ad220f3

Browse files
committed
Fixing MongoDB ODM version (using latest master) and pushing composer.json into the module
1 parent c97e1ed commit ad220f3

File tree

6 files changed

+140
-73
lines changed

6 files changed

+140
-73
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "vendor/mongodb-odm"]
22
path = vendor/mongodb-odm
33
url = git://github.com/doctrine/mongodb-odm.git
4+
[submodule "vendor/mongodb"]
5+
path = vendor/mongodb
6+
url = git://github.com/doctrine/mongodb.git

Module.php

+4-8
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,18 @@ public function modulesLoaded($e)
5252
} else {
5353
// Trying to load DoctrineAnnotations.php without knowing its location
5454
$annotationReflection = new \ReflectionClass('Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver');
55-
$libfile = dirname($annotationReflection->getFileName()) . '/DoctrineAnnotations.php';
55+
$libfile = dirname($annotationReflection->getFileName()) . '/../Annotations/DoctrineAnnotations.php';
5656
}
5757

5858
if (!$libfile) {
59-
throw new RuntimeException(
60-
'Failed to load annotation mappings - check the "annotation_file" setting'
61-
);
59+
throw new RuntimeException('Failed to load annotation mappings - check the "annotation_file" setting');
6260
}
6361

6462
AnnotationRegistry::registerFile($libfile);
6563
}
6664

67-
if (!class_exists('Doctrine\ODM\MongoDB\Mapping\Document', true)) {
68-
throw new \Exception('
69-
Doctrine could not be autoloaded - ensure it is in the correct path.
70-
');
65+
if (!class_exists('Doctrine\ODM\MongoDB\Mapping\Annotations\Document', true)) {
66+
throw new \Exception('Doctrine could not be autoloaded - ensure it is in the correct path.');
7167
}
7268
}
7369

0 commit comments

Comments
 (0)