From 31011aa1086333c165f7f85e3dbaa543789b80a8 Mon Sep 17 00:00:00 2001 From: Alexandre Le Borgne Date: Tue, 18 Jul 2017 13:12:44 +0200 Subject: [PATCH] Surround the creation of the tags with a try catch block Surround the creation of the tags of a try catch block to support php doc with unknown tags such as @JMS\Type("int"), etc --- src/DocBlockFactory.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/DocBlockFactory.php b/src/DocBlockFactory.php index 9ec2455d..e71d83cc 100644 --- a/src/DocBlockFactory.php +++ b/src/DocBlockFactory.php @@ -228,7 +228,11 @@ private function parseTagBlock($tags, Types\Context $context) $result = $this->splitTagBlockIntoTagLines($tags); foreach ($result as $key => $tagLine) { - $result[$key] = $this->tagFactory->create(trim($tagLine), $context); + try { + $result[$key] = $this->tagFactory->create(trim($tagLine), $context); + } + catch(\Exception $e) { + } } return $result;