[doctrine/common-GH-92] Fixing notice when annotation driver is used in combination with static reflection.
This commit is contained in:
parent
d34c39555d
commit
e16803de61
@ -134,6 +134,11 @@ class AnnotationDriver implements Driver
|
||||
public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
|
||||
{
|
||||
$class = $metadata->getReflectionClass();
|
||||
if (!$class) {
|
||||
// this happens when running annotation driver in combination with
|
||||
// static reflection services. This is not the nicest fix
|
||||
$class = new \ReflectionClass($class->name);
|
||||
}
|
||||
|
||||
$classAnnotations = $this->_reader->getClassAnnotations($class);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user