From cd4f54220ea186fc70cbba7c3e8ad1fe9ca9c4fe Mon Sep 17 00:00:00 2001 From: Simon Berton Date: Fri, 16 Mar 2018 14:55:22 -0300 Subject: [PATCH] Update UPGRADE-3.0.md Added an if that fixes action routes defined more than once. That route is already changed to the new documentation and should throw an error if that happened. --- UPGRADE-3.0.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/UPGRADE-3.0.md b/UPGRADE-3.0.md index 0c182a6..ad5cb43 100644 --- a/UPGRADE-3.0.md +++ b/UPGRADE-3.0.md @@ -165,7 +165,12 @@ class SwaggerDocblockConvertCommand extends ContainerAwareCommand $docstart = strrpos(substr($code, 0, $position), '@ApiDoc'); if (false === $docstart) { - throw new \RuntimeException("Method $methodName has no @ApiDoc annotation around\n".substr($code, $position - 200, 150)); + //If action is defined more than once. Should continue and don't throw exception + $docstart = strrpos(substr($code, 0, $position), '@Operation'); + if (false === $docstart) { + + throw new \RuntimeException("Method $methodName has no @ApiDoc annotation around\n".substr($code, $position - 200, 150)); + } } $docend = strpos($code, '* )', $docstart) + 3;