Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed the class name check and removed variable overwriting

  • Loading branch information...
commit e8ada8ce7af43682f9474c9980e20e464d9a2fbf 1 parent 723128f
@stof stof authored
Showing with 5 additions and 7 deletions.
  1. +5 −7 DoctrineMongoDBBundle.php
View
12 DoctrineMongoDBBundle.php
@@ -66,8 +66,8 @@ public function boot()
$this->autoloader = function($class) use ($namespace, $dir, &$container) {
if (0 === strpos($class, $namespace)) {
- $className = str_replace('\\', '', substr($class, strlen($namespace) +1));
- $file = $dir.DIRECTORY_SEPARATOR.$className.'.php';
+ $fileName = str_replace('\\', '', substr($class, strlen($namespace) +1));
+ $file = $dir.DIRECTORY_SEPARATOR.$fileName.'.php';
if (!is_file($file) && $container->getParameter('kernel.debug')) {
$originalClassName = ClassUtils::getRealClass($class);
@@ -79,11 +79,9 @@ public function boot()
if ($dm->getConfiguration()->getAutoGenerateProxyClasses()) {
$classes = $dm->getMetadataFactory()->getAllMetadata();
- foreach ($classes as $class) {
- $name = str_replace('\\', '', $class->name);
-
- if ($name == $originalClassName) {
- $dm->getProxyFactory()->generateProxyClasses(array($class));
+ foreach ($classes as $classMetadata) {
+ if ($classMetadata->name == $originalClassName) {
+ $dm->getProxyFactory()->generateProxyClasses(array($classMetadata));
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.