From 55f26508abe1b8e790e27d98a73386f0828269f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Miko=C5=82ajczuk?= Date: Thu, 10 Jul 2014 11:46:30 +0200 Subject: [PATCH] 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``` --- Parser/JmsMetadataParser.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Parser/JmsMetadataParser.php b/Parser/JmsMetadataParser.php index 1f48f52..580743f 100644 --- a/Parser/JmsMetadataParser.php +++ b/Parser/JmsMetadataParser.php @@ -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 (in_array($dataType['class'], $visited)) { continue;