Don't parse custom properties as classes.

Sometimes instead real class name we can use custom handler name. Then this class can't be initialized and we will get this exception ```ReflectionException: Class custom_handler_name does not exist```
This commit is contained in:
Paweł Mikołajczuk 2014-07-10 11:46:30 +02:00
parent b9b453c857
commit 55f26508ab

View File

@ -150,6 +150,11 @@ class JmsMetadataParser implements ParserInterface, PostParserInterface
} }
} }
// we can use type property also for custom handlers, then we don't have here real class name
if (!class_exists($dataType['class'])) {
continue;
}
// if class already parsed, continue, to avoid infinite recursion // if class already parsed, continue, to avoid infinite recursion
if (in_array($dataType['class'], $visited)) { if (in_array($dataType['class'], $visited)) {
continue; continue;