From c3f0ec74a15873a4c0e9b2fa13c8a15aff0a9fdd Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sat, 28 Jan 2012 09:08:30 +0100 Subject: [PATCH] Make DoctrineBundle fowards compatible with Doctrine 2.2 --- .../Bundle/DoctrineBundle/Mapping/MetadataFactory.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bundle/DoctrineBundle/Mapping/MetadataFactory.php b/src/Symfony/Bundle/DoctrineBundle/Mapping/MetadataFactory.php index fc8f8bad8b..b9c43b1385 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Mapping/MetadataFactory.php +++ b/src/Symfony/Bundle/DoctrineBundle/Mapping/MetadataFactory.php @@ -75,8 +75,8 @@ class MetadataFactory $all = $metadata->getMetadata(); if (class_exists($class)) { - $r = $all[0]->getReflectionClass(); - $path = $this->getBasePathForClass($class, $r->getNamespacename(), dirname($r->getFilename())); + $r = new \ReflectionClass($all[0]->name); + $path = $this->getBasePathForClass($class, $r->getNamespaceName(), dirname($r->getFilename())); $metadata->setNamespace($r->getNamespacename()); } elseif (!$path) { throw new \RuntimeException(sprintf('Unable to determine where to save the "%s" class (use the --path option).', $class)); @@ -104,8 +104,8 @@ class MetadataFactory $all = $metadata->getMetadata(); if (class_exists($all[0]->name)) { - $r = $all[0]->getReflectionClass(); - $path = $this->getBasePathForClass($namespace, $r->getNamespacename(), dirname($r->getFilename())); + $r = new \ReflectionClass($all[0]->name); + $path = $this->getBasePathForClass($namespace, $r->getNamespaceName(), dirname($r->getFilename())); } elseif (!$path) { throw new \RuntimeException(sprintf('Unable to determine where to save the "%s" class (use the --path option).', $all[0]->name)); }