Skip to content

PhpDocInfoFactory does not find any annotations anymore #8312

Answered by samsonasik
shyim asked this question in Q&A
Discussion options

You must be logged in to vote

You need to use Rector\Comments\NodeDocBlock\DocBlockUpdater service to refresh node before return `$node:

diff --git a/src/Rule/v65/MigrateCaptchaAnnotationToRouteRector.php b/src/Rule/v65/MigrateCaptchaAnnotationToRouteRector.php
index fd9db4b..00809f6 100644
--- a/src/Rule/v65/MigrateCaptchaAnnotationToRouteRector.php
+++ b/src/Rule/v65/MigrateCaptchaAnnotationToRouteRector.php
@@ -12,13 +12,17 @@ use Rector\BetterPhpDocParser\PhpDoc\StringNode;
 use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory;
 use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTagRemover;
 use Rector\BetterPhpDocParser\ValueObject\PhpDoc\DoctrineAnnotation\CurlyListNode;
+use Rector\Comments\NodeDocBloc…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@shyim
Comment options

@samsonasik
Comment options

@samsonasik
Comment options

Answer selected by samsonasik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #8311 on November 16, 2023 03:28.